PDA

View Full Version : Extjs 4.2.0 Line Chart yField after some expressions



aihua
23 May 2013, 9:19 AM
Hi,

we use store to get data for yField of the Line Chart.
For example, data[] = {2000, 3000, 4000},
how can we draw the Line Chart with data[] / 1000 as yField?
That is, we want to draw the Line Chart with {2, 3, 4} as the yField, not the origin value from the store.

slemmon
28 May 2013, 9:44 AM
Loop through the array and divide it by 1000 before loading that data to the chart's store perhaps?
You could do that on the data source side of things, which I would think is ideal. Or you could Ajax the data down, change it as you see fit, and then load it to the chart store all from the client side of things.