开发者

extjs - how to define jsonstore for dynamic series in charts?

I want to add in series dynamically into my chart. For instance, I have a grid of unknown number of products. When clicked on the particular row, the sales statistics of that product is added to the chart. Therefore, there may be multiple lines on chart.

The question is, how d开发者_如何学Goo I define the fields of the jsonstore for the yfield of the series which I do not know beforehand?


I stumbled across the same problem. I searched the official forum for a bit, and this seems to be the official way:

You define an new store with all the fields, and then you use the bindstore method:
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.chart.Chart-method-bindStore

Don't forget to define the appropriate series (setSeries-method) and then reload to store to redraw the chart.


if you still looking for the answer, you can go to this link Dynamically generate axis and series in Extjs 4 I answered about it

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜