jQuery UI Widgets Forums Chart why chart is not display

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Ivo Zhulev 9 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • why chart is not display #81235

    veenahosur
    Participant

    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>

    why chart is not display #81244

    Ivo Zhulev
    Participant

    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,
    Ivo

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.