I want to add some series (I get chain data from a webservice as a 3-dim array (and it's JSN ) - I do not know how to get the number of series, so I have to load the series data dynamically).
I am creating an object in Javascript: (such as the Highstock example :)
chainoption [i] = {name: nominal [i], data: Datarai}; Results such as: [object {name = "series", data = [1041375600000, 29 9]]}] I was trying to add the series like this: $ Each (series option, work (item no, item) {chart.addSeries ({name: item.name, data: item.data}, wrong);}); Chart.redraw (); But the chart pulls the series strangely and does not convert to timestamps to date.
Is there a problem in my chart data from webservice?
This is my code:
Thanks for any help so far.
Edit
It seems that the chart has all the default values of the unknown timeline / zoom value. I do not know why these components are not displayed.
The problem may be that I am portraying the chart after getting started? chart = new highchart. Chart (option); But I have to do this because of dynamic chain loading.
EDIT2 I'm not sure if I'm loading too much data or something else I can dynamically create my series yXx:
edit: timeline / zoom
Edit it . However, why do not you add these series when the chart is ready?
chart = new highchart. Chart (option, function (ch) {$ .each (series option, function (item no, item) {Ch.addSeries ({name: item.name, data: item.data}, wrong);}); chart Redraw ();});
No comments:
Post a Comment