You must be logged in to post your query.
Home › Forums › Feature Requests & Feedback › stackedColumn
Tagged: stackedColumn
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
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.
You must be logged in to reply to this topic. Login/Register