jQWidgets Forums

jQuery UI Widgets Forums Chart Category Axis — Help

This topic contains 0 replies, has 1 voice, and was last updated by  sushanth009 13 years ago.

Viewing 1 post (of 1 total)
  • Author
  • Category Axis — Help #4727

    sushanth009
    Member

    Hello Peter,

    I am working the column graphs currently. I noticed that when the CategoryAxis dataField starts with a number, it is not being rendered on the chart. But if it starts with a alphabet it seems to be working fine.. Is this a know issue or am I making a mistake in here. I am attaching the code with this code..

    The code used to populate the Graph is

    var source = {
    datafields: [{
    name: 'a'
    }, {
    name: 'c'
    }],
    localdata: result,
    datatype: 'json'
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    var settings = {
    title: "Service Locations",
    showLegend: true,
    source: dataAdapter,
    enableAnimations: false,
    padding: {
    left: 15,
    top: 5,
    right: 15,
    bottom: 5
    },
    titlePadding: {
    left: 90,
    top: 0,
    right: 0,
    bottom: 10
    },
    categoryAxis: {
    dataField: 'a',
    showGridLines: true,
    text: 'Service Locations',
    textRotationAngle: -90,
    },
    colorScheme: 'scheme01',
    seriesGroups: [{
    type: 'column',
    valueAxis: {
    unitInterval: 1000,
    displayValueAxis: true,
    description: 'Cost'
    },
    series: [{
    dataField: 'c',
    displayText: 'Cost'
    }]
    }]
    };

    $('#csl-charts-main').jqxChart(settings);

    The json Object for the First case where it seems to working is

    [
    { "a":"Unreg_Lights", "c":"10705.97"}, { "a":"Pool", "c":"9344.96" },{ "a":"OFC_102Leasing", "c":"8676.12"},
    { "a":"Parking_Deck", "c":"7654.00" }, { "a":"Club_101", "c":"6776.79" }, { "a":"Bldg_6", "c":"6427.92" },
    { "a":"Bldg_4", "c":"6136.03" }, { "a":"Panel_1", "c":"6008.17"}, { "a":"Exercise_2","c":"5941.89" },
    { "a":"Panel_3", "c":"4053.98"}, { "a":"Bldg_7", "c":"3951.26" }, { "a":"Shop_226", "c":"3661.31" },
    { "a":"Bldg_5", "c":"3067.62" }, { "a":"REC_105Exercise", "c":"2886.03"}, { "a":"Panel_2", "c":"2765.45"},
    { "a":"Elevator", "c":"793.36" }
    ]

    The graph rendered is http://img827.imageshack.us/img827/5168/chartnoerror.png

    The json Object for which it does not seem to work is

    [
    { “a”:”10_Perimeter_Park”,”c”:”24348.74″},
    { “a”:”10_Perimeter_Park_Drive”,”c”:”8128.22″},
    { “a”:”12_Perimeter_Park_Dr”,”c”:”6131.09″ },
    { “a”:”10_Perimeter_Park_Dr”, “c”:”607.48″ }
    ]

    The image that is rendered is http://img688.imageshack.us/img688/435/charterror.png

    Can you look into this and let me know where i am going wrong..

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.