Results 1 to 3 of 3

Thread: Grouped data in line chart

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    2
    Vote Rating
    0
      0  

    Default Unanswered: Grouped data in line chart

    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?

    Code:
    {
                "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!

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,389
    Answers
    716
    Vote Rating
    497
      0  

    Default

    Does this chart help?
    http://dev.sencha.com/deploy/ext-4.0...roupedBar.html

    If this is not what you are looking for, can you provide a screen of the type of chart that you would like to see?

    Regards,
    Scott.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    2
    Vote Rating
    0
      0  

    Default

    Visually, the result would appear like http://dev.sencha.com/deploy/ext-4.0...veUpdates.html (without necessarily updating).

    However, imagine a reports dashboard where the user is able to select the criteria for the data they want to see on the chart. They might select a particular date range, or x number of items to compare against each other, each item being a seperate series. Following the examples though, I would need to know in advance what the user wanted to report on, and hard-code those criteria into my view. What I am trying to achieve needs to be dynamic.

    A new post today (http://www.sencha.com/forum/showthre...el-dynamically) may be the answer. Does anyone know if this will help solve my issue, and where I might find a working example?

    Thank you.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •