You must be logged in to post your query.
Home › Forums › Chart Support › Undetermined number of Y Axis
Tagged: y multiple y axis y axis external json
I am updating my charts dynamically from an external JSON object. My chart will display multiple Y axis and the number of Y axis is determined by the volume of data read in from the JSON file. How do I create a chart with an undetermined number of Y Axis?
@1alexritchie1,
Can you please create a JSFiddle reproducing the issue and also provide the sample JSON data so that we can look into it, understand the scenario better and help you out.
___________ Indranil Deo Team CanvasJS
I have created this JSFiddle: https://jsfiddle.net/zLxpsth8/
Basically, where the data transforms from 10 to 15 in the different ID i want to have them as 2 different lines on the graph. However, although the data is in this format: [ { “id”: “4568ID214”, “data”: [ 10, 10, 10, 10, 10 ] }, { “id”: “5687ID556”, “data”: [ 15, 15, 15, 15, 15 ] } ]
I have know way of knowing how many objects containing ID & Data will be in the JSON object with each of them to get their own line on the chart.
You can loop through the JSON and parse it to the format accepted by CanvasJS as shown in the JSFiddle.
You must be logged in to reply to this topic. Login/Register