1. #1
    Sencha User priyankasingh's Avatar
    Join Date
    Apr 2012
    Location
    India
    Posts
    3
    Vote Rating
    0
    priyankasingh is on a distinguished road

      0  

    Default Answered: How to “GroupBy” in month of type “Time” in Touch Chart 2.0

    Answered: How to “GroupBy” in month of type “Time” in Touch Chart 2.0


    See the x-axis which is of "month". The problem is month is being repeated according to data. I want to GroupBy month. Like group all the data of Jan and display single month Jan and so on...
    Screen Shot 2012-04-09 at 3.35.04 PM.jpg

    Code Below:

    I want type: 'Time' to GroupBy in month. Like Jan,Feb...A month data will not repeat


    axes: [
    {
    type: 'Time',
    position: 'bottom',
    fields: [
    'date'
    ],
    dateFormat: 'M',
    label: {
    rotate: {
    degrees: 90
    }
    }
    }],
    Attached Images
    Priyanka Singh
    Application Developer
    Site:: http://www.innofied.com
    Alternative Email:: humtum.ruby@gmail.com
    LinkedIn:: http://in.linkedin.com/in/priyankasingh84
    Twitter:: @humtumruby

  2. You have it grouped server side but now you want to group it again? Charts don't support grouping, List remains the only widget that supports grouping.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Answers
    3540
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You need to have the data sent from the server that you want to use meaning the grouping should be done server side. Server (especially if you do SQL) can do this much more performant than the client
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User priyankasingh's Avatar
    Join Date
    Apr 2012
    Location
    India
    Posts
    3
    Vote Rating
    0
    priyankasingh is on a distinguished road

      0  

    Default


    My data is grouped in server side.

    My question is how would I do "groupBy" while displaying it through touch chart2?

    Or is their any property in touch chart2 which will groupBy the data in Sencha 2.
    Priyanka Singh
    Application Developer
    Site:: http://www.innofied.com
    Alternative Email:: humtum.ruby@gmail.com
    LinkedIn:: http://in.linkedin.com/in/priyankasingh84
    Twitter:: @humtumruby

  5. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Answers
    3540
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You have it grouped server side but now you want to group it again? Charts don't support grouping, List remains the only widget that supports grouping.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  6. #5
    Sencha User priyankasingh's Avatar
    Join Date
    Apr 2012
    Location
    India
    Posts
    3
    Vote Rating
    0
    priyankasingh is on a distinguished road

      0  
    Priyanka Singh
    Application Developer
    Site:: http://www.innofied.com
    Alternative Email:: humtum.ruby@gmail.com
    LinkedIn:: http://in.linkedin.com/in/priyankasingh84
    Twitter:: @humtumruby

  7. #6
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Answers
    6
    Vote Rating
    8
    Kikketer will become famous soon enough

      0  

    Default


    Server side grouping makes sense, but the documentation for the Time axis type:
    Code:
    axes: [{
        type: 'Time',
        position: 'bottom',
        fields: 'date',
        title: 'Day',
        dateFormat: 'M d',
        groupBy: 'year,month,day',
        aggregateOp: 'sum',
    
    
        constrain: true,
        fromDate: new Date('1/1/11'),
        toDate: new Date('1/7/11')
    }]
    Looks like we could group? The documentation actually says:
    "use this axis for listing dates that you will want to group or dynamically change".

    Of course this is Charts 1 documentation, but you would think 2 should do everything 1 did and then some (hopefully faster/better).

    Also, the groupBy config option here isn't explained at all in the documentation (I couldn't find it in either the charts 1 docs, or the sencha 2 docs). Neither is aggregateOp.

Thread Participants: 2

Tags for this Thread