Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Aug 2009
    Posts
    11
    Vote Rating
    0
    vdan is on a distinguished road

      0  

    Default [OPEN-EXTJSIV-205] Numeric axis issues

    [OPEN-EXTJSIV-205] Numeric axis issues


    Hi,

    it is great to have Raphael/graphs now available in ExtJS.
    However, I am experiencing some troubles with the minimum value of the Numeric axis:

    • when setting value to -400 (my data ranges from ~500 to ~1600, but I wanted to try negative values), the minimum value actually dispayed is -1000!
    • when setting the value to 400, the minimum value actually displayed in 0 (despite alwaysShowZero: false)

    I copy my code at the end of the post for reference (inspired by the line example).

    I take the chance of this post for a few additional comments/suggestions:

    • Comment for the property "calculateByLabelSize" of the Time axis is copied from the "minimum" property of the Numeric axis, and is therefore incorrect:
    PHP Code:
    The minimum value drawn by the axis. If not set explicitlythe axis
          
    minimum will be calculated automatically
    • Also, I have noticed that, when constraining a Time axis, the minimum and maximum values of the y axis do not adjust to the only displayed data. This is an implementation choice, and is well acceptable. However, there could be some cases where it is desirable that the min/max values adjust to the only displayed data, so it would be nice to have such a config option (suggestion).
    • Lastly, I second a comment that was already made on the forum (can't find it again), about terminology: it some places we find axis, while in other axes.
    Cheers!

    PHP Code:

    // myArray is an array with values ranging from about 500 to about 1600

    var data = [];
    for(
    i=0i<myArray.lengthi++) data.push({
        
    dateExt.Date.format(Ext.Date.add(dateExt.Date.DAYi), 'm/d/y'),
        
    valuemyArray[i]
    });


    Ext.onReady(function () {
      
        
    // Set up a model to use in our Store
        
    Ext.regModel('User', {
            
    fields: [ 'date''value']
        });

        var 
    myStore = new Ext.data.Store({
            
    model'User',
            
    data data
        
    });
      
        var 
    win Ext.create('Ext.Window', {
            
    width800,
            
    height600,
            
    hiddenfalse,
            
    maximizabletrue,
            
    title'Line Chart',
            
    renderToExt.getBody(),
            
    layout'fit',
            
    items: {
                
    xtype'chart',
                
    id'chartCmp',
                
    storemyStore,
                
    axes: [{
                    
    type'Numeric',
                    
    position'left',
                    
    fields'value',
                    
    alwaysShowZerofalse,
                    
    minimum400   // <<<<<<<<<< Test with values 400 or -400; in both cases, unexpected result
                
    }, {
                    
    type'Time',
                    
    position'bottom',
                    
    fields'date',
                    
    title'Day',
                    
    dateFormat'M d',
                    
    groupBy'year,month,day',
                    
    aggregateOp'sum',

                }],
                
    series: [{
                    
    type'line',
                    
    xField'date',
                    
    yField'value'
                    
    ,showMarkersfalse
                
    }]
            }
        });
    }); 

  2. #2
    Sencha User
    Join Date
    Mar 2011
    Posts
    4
    Vote Rating
    0
    bbraun is on a distinguished road

      0  

    Default


    I think this might be a bug in the snapEnds function, which recalculates the axis minimum.

Similar Threads

  1. Replies: 5
    Last Post: 16 Nov 2011, 8:11 AM
  2. Replies: 8
    Last Post: 11 Apr 2011, 7:49 PM
  3. [FIXED-EXTJSIV-194] Grid Scroll Issues
    By James Goddard in forum Ext:Bugs
    Replies: 2
    Last Post: 1 Apr 2011, 11:05 AM
  4. [CLOSED EXTJSIV-146] Several issues with numeric axis
    By James Goddard in forum Ext:Bugs
    Replies: 6
    Last Post: 24 Mar 2011, 7:49 PM
  5. Setting the Line Chart Numeric Axis Range
    By GoneIn20Seconds in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 2 Apr 2010, 8:13 AM

Thread Participants: 1