johan_fox
19 Apr 2012, 7:05 AM
Within a Chart, is it possible to use groupField in the same way that you can group data within a Grid?
I am attempting to overlay multiple series on one chart, from a single store. I understand that charts do not support multiple stores, so I have generated a single store that returns all of my data. I have included some example data of what I mean below - this data should show a line chart with x-axis of Month/Year, y-axis of Total, with 3 different series (LINE1, LINE2, LINE3). Without grouping this data by the Name field, the resulting chart is a single series that joins the last point of LINE1 to the first point of LINE2, and the last point of LINE2 to the first point of LINE3, which is not useful. How can I separate these series into different lines?
{
"Name":"LINE1",
"Month":5,
"Year":11,
"Date":"May/11",
"Total":10
},{
"Name":"LINE1",
"Month":6,
"Year":11,
"Date":"June/11",
"Total":6
},{
"Name":"LINE1",
"Month":7,
"Year":11,
"Date":"July/11",
"Total":8
},{
"Name":"LINE1",
"Month":8,
"Year":11,
"Date":"August/11",
"Total":14
},{
"Name":"LINE2",
"Month":5,
"Year":11,
"Date":"May/11",
"Total":18
},{
"Name":"LINE2",
"Month":6,
"Year":11,
"Date":"June/11",
"Total":16
},{
"Name":"LINE2",
"Month":7,
"Year":11,
"Date":"July/11",
"Total":18
},{
"Name":"LINE2",
"Month":8,
"Year":11,
"Date":"August/11",
"Total":19
},{
"Name":"LINE3",
"Month":5,
"Year":11,
"Date":"May/11",
"Total":23
},{
"Name":"LINE3",
"Month":6,
"Year":11,
"Date":"June/11",
"Total":28
},{
"Name":"LINE3",
"Month":7,
"Year":11,
"Date":"July/11",
"Total":34
},{
"Name":"LINE3",
"Month":8,
"Year":11,
"Date":"August/11",
"Total":22
}
Is this possible in Ext? Any advice would be much appreciated!
I am attempting to overlay multiple series on one chart, from a single store. I understand that charts do not support multiple stores, so I have generated a single store that returns all of my data. I have included some example data of what I mean below - this data should show a line chart with x-axis of Month/Year, y-axis of Total, with 3 different series (LINE1, LINE2, LINE3). Without grouping this data by the Name field, the resulting chart is a single series that joins the last point of LINE1 to the first point of LINE2, and the last point of LINE2 to the first point of LINE3, which is not useful. How can I separate these series into different lines?
{
"Name":"LINE1",
"Month":5,
"Year":11,
"Date":"May/11",
"Total":10
},{
"Name":"LINE1",
"Month":6,
"Year":11,
"Date":"June/11",
"Total":6
},{
"Name":"LINE1",
"Month":7,
"Year":11,
"Date":"July/11",
"Total":8
},{
"Name":"LINE1",
"Month":8,
"Year":11,
"Date":"August/11",
"Total":14
},{
"Name":"LINE2",
"Month":5,
"Year":11,
"Date":"May/11",
"Total":18
},{
"Name":"LINE2",
"Month":6,
"Year":11,
"Date":"June/11",
"Total":16
},{
"Name":"LINE2",
"Month":7,
"Year":11,
"Date":"July/11",
"Total":18
},{
"Name":"LINE2",
"Month":8,
"Year":11,
"Date":"August/11",
"Total":19
},{
"Name":"LINE3",
"Month":5,
"Year":11,
"Date":"May/11",
"Total":23
},{
"Name":"LINE3",
"Month":6,
"Year":11,
"Date":"June/11",
"Total":28
},{
"Name":"LINE3",
"Month":7,
"Year":11,
"Date":"July/11",
"Total":34
},{
"Name":"LINE3",
"Month":8,
"Year":11,
"Date":"August/11",
"Total":22
}
Is this possible in Ext? Any advice would be much appreciated!