2
I would like to know what would be the correct structure to create a LINE chart in Highcharts with dynamic data: Example http://jsfiddle.net/gumaro/6u4Ha/2/
I have values that I want to show in a row, their evolution during the months, but I don’t have all the months filled and so the graph would start in the middle of the year (for example).
What would be the best way to do JSON to fill the X axis with the referring months along with the values?
Could you give more details? Could you post any attempts you’ve already made?
– Erlon Charles
I’m not sure I really understand what you want in response. If you’re talking about the JSON format, you can do something like the below:
{"Result":[["Maio", "Junho", "Julho"], [20, 30, 15]]}
Then when using do: ;Result[0] //X
Result[1] //Y
If that’s not what you want, comment more details there to make it easier to help you.– Renatto Machado
@Erloncharles I don’t know if this helps: http://pastebin.com/5yM4uFNL
– gumaro
@Renattomachado That way I wouldn’t need to put values in "Series"?
– gumaro
@gumaro Yes. It will only replace the call:
categories: Result[0];
Andseries: Result[1]
– Renatto Machado
Ever tried to use Dxchartjs? In it you pass only one datasource with a very simple JSON, hence it already mounts both X and Y.
– Renatto Machado
@Renattomachado: I’m using Highcharts in a work of completion and what I saw in Dxchartjs is only 30 days of testing, correct?
– gumaro
@Unfortunately the trial version is only 30 days even. You can use the Charjs is very similar to the structure I told you about and is
OpenSource
! They are only suggestions, theHighCharts
is also very good!– Renatto Machado
@Renattomachado is, gets complicated with trial version. Chartjs I used in another project I did, I opted for Highcharts because of the export functionality and its loading speed.
– gumaro