Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: What has happen to "reverse" config on chart axes?

  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2010
    Posts
    102

    Default What has happen to "reverse" config on chart axes?

    I have axes, "left" and "top". I want the zero (minimum) value of left axes to be at the top. On Extjs 3.0, this was the reverse property. Doesnt seem to be any provision for this in V4 - no luck finding that capability in the source code either.

  2. #2
    Sencha User Wedgybo's Avatar
    Join Date
    Jul 2011
    Location
    Edinburgh, Scotland
    Posts
    17

    Post

    I came looking for the same information so I'm filling in an answer for anyone else looking.

    Use the sorters config option within your charts store to reverse the order of the data on your axis.

    Cheers,
    Jamie

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2010
    Posts
    102

    Default

    That works to show the graph correctly but the axis is still labelled incorrectly. Ie, say my depth axis is still labelled with 0 at bottom and maxdepth at the top regardless of the sort order. However, the data is extracted
    in the reverse order.

  4. #4
    Ext JS Premium Member
    Join Date
    Apr 2010
    Posts
    102

    Default

    Some images to demostrate what I get:

    d2.pngd1.png
    The upper image is with a sorter applied, the lower image is "out of the box" - the lower image is correctr
    representation of the data.
    What I want though is Depth to have 0 and the top and 200 at the bottom of axis, with line as in the upper image.

  5. #5
    Sencha User
    Join Date
    Jun 2012
    Posts
    9

    Default

    Any fix for this yet OP?

  6. #6
    Ext JS Premium Member
    Join Date
    Apr 2010
    Posts
    102

    Default

    Not that I am aware of. Reverted to ExtJS 3.4.

  7. #7
    Sencha User
    Join Date
    Jun 2007
    Posts
    266

    Default

    Are there any plans to put this config back in?

  8. #8
    Ext JS Premium Member
    Join Date
    Apr 2010
    Posts
    102

    Default

    I havent heard a peep. As far as I can tell, there is simply no way to create the charts like this in Ext4 so stuck with v3.4. The alternative is hack the Ext4 code yourself and put the functionality back. I think the developers thought it was covered by sorters.

  9. #9
    Sencha User
    Join Date
    Jun 2007
    Posts
    266

    Default

    Downloaded 3.4. Let's see if I can hack together an override...

  10. #10
    Sencha User
    Join Date
    Jun 2007
    Posts
    266

    Default

    Instead, I am going to try and see if I can redraw the labels myself to make the lowest # at the top, and largest at the bottom. But how do you use the sorters properly on your store? I have been playing with them, but I can't get it to reverse the axis. I just have two properties, in the model/store:

    data (int)
    coll_at (timestamp)

    I want the lowest 'data' integer to be at the top, and largest at the bottom, and the secondary sort should be by timestamp to keep it in order. This is my store, why isn't it working the way it should? I have tried quite a few variations, but thought I would ask since it's not working out correctly and still putting the lowest #'s at the bottom.

    Code:
    Ext.define('FH.store.History', {
        extend: 'Ext.data.Store',
        autoLoad: false,
        model: 'FH.model.History',
        storeId: 'fhHistory',
        sorters: [
            { property: 'data', direction: 'DESC' },
            { property: 'coll_at', direction: 'ASC' }
        ]
    });

    Or maybe this is sorting the data up, and I just need to play with the labels, we'll see.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 28 Oct 2009, 6:38 AM
  2. Replies: 1
    Last Post: 31 May 2009, 7:09 PM
  3. Replies: 7
    Last Post: 4 Feb 2009, 4:29 PM

Posting Permissions

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