I have a store that has these fields:
Code:
fields: [{name: 'entityName', type: 'string'},
{name: 'startDate', type: 'date'},
{name: 'hoursSpent', type: 'int'}
]
I would like to represent this store in a line (or a (stacked) bar) chart with a separate line for each entityName field showing the hoursSpent for that entityName for the specified startDate.
Example JSON data:
Code:
[{"entityName":"Department1","startDate":"2008-01-01","hoursSpent":"646", <...>},
{"entityName":"Department2","startDate":"2008-01-01","hoursSpent":"740", <...>},
{"entityName":"Department1","startDate":"2008-02-01","hoursSpent":"465", <...>},
{"entityName":"Department2","startDate":"2008-02-01","hoursSpent":"879", <...>},
<...>
]
How the chart should look crudeDrawing.jpg(Sorry for the crude drawing).
Is it possible to automatically split a chart series into groups based on a field's value like this? Or will I need to pivot the table manually and then use a separate series for each entityName?
Similar problem (unanswered, ExtJS3)
Thank you for your time.