I am looking to incorporate multiple LineSeries in an ExtJS4 chart. In my setup, I have a store structured as follows:
Ext.define('DayStatistics', {
extend:'Ext.data.ArrayStore',
fields:[ 'date', 'count_impressions', 'count_clicks', 'count_conversions' ]
});
My goal is to draw three lines ('count_impressions', 'count_clicks', 'count_conversions') for each entry selected in the grid view. This means that every grid entry should correspond to multiple entries in the store.
Currently, I have a function that triggers on selectionchange:
loadChart: function (Model, records) {
// Code for removing previous chart data
// Code for adding new series to the chart based on selected records
}
While this function allows me to graph different entries from the grid view, it does not provide the functionality of displaying "multiple stores." How can I implement this?
One idea I am considering involves "linearizing" the store by restructuring it like { date : 'impressions_1', 'impressions_2', ... }. However, this solution would simply transfer the complexity from charting to the store structure.