Home forums Feature Requests & Feedback stackedColumn

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Sunil Urs 3 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4741

    ihisham
    Participant

    Hi there,
    so i’m tryin’ to do a little example using AJAX, PHP, MYSQL, it was all good til’ i tried to use “stackedColumn”, my probleme is i want to use multiple array of data series, but when i retrieve data as JSON from .php it works only for one data series
    Could you please give me an example (a jquery function and what in .php) ?

    Best regards.
    by the way love your work

    #4744

    Sunil Urs
    Keymaster

    Hi,

    You can take one of the two approaches…

    1. Return the data variable directly from the server and assign it to the chart’s “data” property. So your JSON response would look something like this.

    [
    {
    type: "stackedColumn",
    dataPoints: [
    { y: 111338, label: "USA" },
    { y: 49088, label: "Russia" },
    { y: 62200, label: "China" },
    { y: 90085, label: "India" },
    { y: 38600, label: "Australia", },
    { y: 48750, label: "SA", }

    ]
    }, {
    type: "stackedColumn",
    dataPoints: [
    { y: 135305, label: "USA" },
    { y: 107922, label: "Russia" },
    { y: 52300, label: "China" },
    { y: 3360, label: "India" },
    { y: 39900, label: "Australia", },
    { y: 0, label: "SA", }

    ]
    }
    ]

    2. Return data in any custom format and then process it on the client side to build array in above format.

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

You must be logged in to reply to this topic.