View Full Version : Guidelines for creating dynamic charts

12 Mar 2013, 2:06 AM

I am really new to Sencha and I have a newbie question. I need to create a dynamic chart that gets data from a web-server.

The server response is something like
{ "x" : 0.44, "y" : 34.4 }

I did some reading, and apparently I need to create a model such as:

Ext.define('XYData', {
extend: 'Ext.data.Model',
fields: [
{name: 'x', type: 'double'},
{name: 'y', type: 'double'},

And to connect a json proxy in order to read it...

But how do I refresh the chart every 100ms ? and Let's say I want the graph to show the last 100 values or so.

Thanks in advance,

13 Mar 2013, 2:03 PM
Just setup a setInterval or Ext.util.TaskManager job to run every 100ms and do a store.load();