1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Cologne, Germany
    Posts
    12
    Vote Rating
    0
    klemo is on a distinguished road

      0  

    Default Unanswered: Maximum chart axis value

    Unanswered: Maximum chart axis value


    Hi,

    is there a way to get the maximum number of an numeric axis to follow the sequence of the previous numbers?

    In my test case, the y-axis labels increase by 10 from 0 to 40. Only the last label is 43 as the highest value of my data store (see screen_01). Following the previous sequence, I would like it to be 50 (as the drawn chart in the mockup).

    Using the max property would do the trick here, but only when you know the data range. In my original project the data is loaded via JSON and the displayed data range will differ widely depending on various filter settings.

    Any ideas? Is there a property I've missed?
    Attached Images

  2. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,149
    Vote Rating
    99
    Answers
    132
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      0  

    Default


    You can try changing a config the Numeric axis has. I took a look at the source code and there is this one config that may do the trick.
    Code:
    /**
     * @cfg {Boolean} adjustMaximumByMajorUnit
     * Indicates whether to extend maximum beyond data's maximum to the nearest
     * majorUnit.
     */
    adjustMaximumByMajorUnit: false,
    Maybe setting that to true will solve your issue.

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Cologne, Germany
    Posts
    12
    Vote Rating
    0
    klemo is on a distinguished road

      0  

    Default


    Adding this property to my axis config had no effect, but I found it listed in the docs of ST 2.2.1 as:
    Will be supported soon.
    http://docs.sencha.com/touch/2.2.1/#...mumByMajorUnit

    I'd really like to know what "soon" means... Sencha Touch 2.3 or rather 3.0?