jQuery UI Widgets › Forums › Chart › why chart is not display
Tagged: chart
This topic contains 1 reply, has 2 voices, and was last updated by Ivo Zhulev 9 years, 2 months ago.
-
Authorwhy chart is not display Posts
-
I am trying to jqxchart.But its not displaying any thing.can any one tell me what is wrong in the below code
`function GetDistrictReport(districtname) {
$.ajax({
type: “POST”,
url: “Agriculture.asmx/GetDistrictReport”,
data: “{‘districtname’:'” + districtname + “‘}”,
contentType: “application/json; charset=utf-8”,
dataType: “json”,
success: OnSuccess,
//error: OnError});
function OnSuccess(data, status) {
var myObject = JSON.parse(data.d);
var source = {
datatype: “json”,
datafields: [
{ name: ‘districtname’ },
{ name: ‘talukname’ },
{ name: ‘samplescollected’ }],
localdata: myObject
};
var dataAdapter = new $.jqx.dataAdapter(source);
var settings = {
title:”Samples Collected”,
showLegend: true,
padding: { left: 5, top: 5, right: 5, bottom: 5 },
titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },
source: dataAdapter,
categoryAxis:
{
dataField: ‘samplescollected’,
showGridLines: true
},
colorScheme: ‘scheme01’,
seriesGroups:
[
{
type: ‘column’,
columnsGapPercent: 50,
seriesGapPercent: 0,
valueAxis:
{
unitInterval: 10,
minValue: 0,
maxValue: 100,
displayValueAxis: true,
axisSize: ‘auto’,
tickMarksColor: ‘#888888’
},
series: [
{ dataField: ‘samplescollected’, displayText: ‘samplescollected’ }]
}
]
};$(‘#jqxChart’).jqxChart(settings);
alert(settings);
}
}<html>
<body>
<div id=”jqxChart” style=”width: 60px; height: 60px; z-index: 109999;”></div>
</body>
</html>Hi veenahosur,
I see you had a syntax error. You have “,” after OnSuccess
If you have any further questions, please feel free to ask.Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.