Please help me!!!
I need to create a line chart containing a unknown number of series based on the data in the data store.
My data model and store looks like this:
Code:
var chartDataModel =
Ext.define
(
'chartDataModel',
{
extend: 'Ext.data.Model',
fields:
[
{
name: 'productName',
mapping: 'ProductName',
type: 'string'
},
{
name: 'entryCount',
mapping: 'EntryCount',
type: 'int'
},
{
name: 'createdShort',
mapping: 'CreatedShort',
type: 'string'
}
]
}
);
// This create the Store. It use the Log Data Model
var chartDataStore =
Ext.create
(
'Ext.data.Store',
{
id: 'chartDataStore',
model: 'chartDataModel',
proxy:
{
type: 'ajax',
url: '/Helpers/GetLogAggregatesForDeveloper.ashx',
reader:
{
root: 'LogAggregates',
reader: 'array'
}
},
listeners: {
load: {
fn: function () {
}
}
}
}
);
chartDataStore.load();
The store will contain something like this:
Capture.PNG
What I would like is to generate a line(serie) for every distinct 'productName'. The X-Axis should be represented by 'createdShort' and the Y-Axis by 'entryCount'.
Hope someone out/in there can help me.