View Full Version : Line Chart with Multiple Stores

21 Apr 2014, 2:20 PM
Hi - My last post didn't receive any responses, so let me please re-phrase the question.

Multiple series need to be updated and displayed simultaneously on the same line chart in real time, so the X-axis progresses as new points are added to each series. No problem with a single series/store. Now I need to expand the application to simultaneously graph several series (overlayed) on the same line chart. The example on the Sencha website uses "static" data. Mine is dynamic (current network throughput).
In my application, all data uses the same 2-value store model (format), however each series is coming from a different source. Is it possible generate a line chart with multiple series/stores?

Thank you for your help.

21 Apr 2014, 10:24 PM
I hope the following demo can show the route to take:

1. navigate to http://docs.sencha.com/extjs/4.2.2/extjs-build/examples/charts/Line.html

2. in console type:

Ext.ComponentQuery.query('chart')[0].getStore().add({name:'September', data1:88, data2:99, data3:11})

We are adding new x value (September) and three series data. So the way would be to keep one store with multiple series and add/remove data to/from this store as needed.