jQWidgets Forums

jQuery UI Widgets Forums Chart Auto Series

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Auto Series Posts
  • Auto Series #74301

    Take the following Data :-

    No Region Ports
    1 NY 1200
    2 NY 1203
    3 NY 1204
    1 NJ 124
    1 NJ 120

    I want to build a stacked area chart with Region .. in this case there are 2 regions , but I can have any number (Dynamic) and do not know at design time what the regions are. How could this be achieved ?

    Auto Series #74313

    Dimitar
    Participant

    Hello duncan.mcdonald@virsae.com,

    jqxChart requires a data point-centered data source, e.g.:

    [
        {
            "No": 1,
            "NY": 1200,
            "NJ": 124
        },
        {
            "No": 2,
            "NY": 1203,
            "NJ": 120
        },
        {
            "No": 3,
            "NY": 1204,
            "NJ": null
        }
    ]

    In the data adapter’s beforeLoadComplete callback function you can transform your source structure to the required one (data point-centered) and in the loadComplete callback you can dynamically populate the chart series array based on the data. You can learn more about these callbacks in the jqxDataAdapter’s help topic.

    Best Regards,
    Dimitar

    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.