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

      0  

    Default [OPEN] Ext.chart.axis.Numeric - minimum value

    [OPEN] Ext.chart.axis.Numeric - minimum value


    Hi,
    I tried to configure the minimum value in the axis configuration of a chart.
    The axis are drawn correctly but the graph values aren't.
    Do I miss something?


    from the column chart example:

    PHP Code:
    Ext.onReady(function () {
        var 
    win Ext.create('Ext.Window', {
            
    width800,
            
    height600,
            
    hiddenfalse,
            
    maximizabletrue,
            
    title'Column Chart',
            
    renderToExt.getBody(),
            
    layout'fit',
            
    tbar: [{
                
    text'Reload Data',
                
    handler: function() {
                    
    store1.loadData(generateData());
                }
            }],
            
    items: {
                
    id'chartCmp',
                
    xtype'chart',
                
    animatetrue,
                
    shadowtrue,
                
    storestore1,
                
    axes: [{
                    
    type'Numeric',
                    
    position'left',
                    
    fields: ['data1'],
                    
    label: {
                        
    rendererExt.util.Format.numberRenderer('0,0')
                    },
                    
    title'Number of Hits',
                    
    minimum0,
                    
    gridtrue
                
    }, {
                    
    type'Category',
                    
    position'bottom',
                    
    fields: ['name'],
                    
    title'Month of the Year'
                
    }],
                
    series: [{
                    
    type'column',
                    
    axis'bottom',
                    
    highlighttrue,
                    
    tips: {
                      
    trackMousetrue,
                      
    width140,
                      
    height28,
                      
    renderer: function(storeItemitem) {
                        
    this.setTitle(storeItem.get('name') + ': ' storeItem.get('data1') + ' $');
                      }
                    },
                    
    label: {
                      
    display'insideEnd',
                      
    'text-anchor''middle',
                        
    field'data1',
                        
    rendererExt.util.Format.numberRenderer('0'),
                        
    orientation'vertical',
                        
    color'#333'
                    
    },
                    
    xField'name',
                    
    yField'data1'
                
    }]
            }
        });
    }); 

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    In your series, change the axis: 'bottom' to axis: 'left' to bind it to the numeric axis. We're still in the process up updating our documentation to make this clearer and fixup some of the examples that may have it set wrong as well.

  3. #3
    Sencha User
    Join Date
    May 2009
    Posts
    7
    Vote Rating
    0
    3dm is on a distinguished road

      0  

    Default


    Thank you Jamie! That solves the problem for the column chart.
    Now, I'd like to draw a scatter chart with two numeric axes mapped on data1 and data2 and radius on data3.
    It works perfectly with the generated data, but again, if I want to set the minimum value to 0 for both the axes, how do I bind the series to the axes? Is it possible?


    PHP Code:
       chart = new Ext.chart.Chart({
            
    animatetrue,
            
    storestore1,
            
    renderToExt.getBody(),
            
    shadowtrue,
            
            
    axes: [{
                
    type'Numeric',
                
    position'left',
                
    fields: ['data2'],
                
    label: {
                    
    rendererExt.util.Format.numberRenderer('0,0')
                },
                
    gridtrue,
                
    minimum0,
                
    title'data2'
            
    },{
                
    type'Numeric',
                
    position'bottom',
                
    label: {
                    
    rendererExt.util.Format.numberRenderer('0,0')
                },
                
    fields: ['data1'],
                
    gridtrue,
                
    minimum0,
                
    title'data1'
            
    }],

            
    insetPadding40,
            
    series: [{
                
    type'scatter',
                
    axisfalse,
                
    xField'data1',
                
    yField'data2',
                
    label: {
                    
    display'middle',
                    
    field'data2',
                    
    renderer: function (n) { return >> 0; },
                    
    'text-anchor''middle',
                    
    contrasttrue
                
    },
                
    renderercreateHandler('data3'),
                
    markerCfg: {
                    
    type'circle',
                    
    size5,
                    
    fill'#a00',
                    
    'stroke-width'1
                
    }
            }]
        }); 

  4. #4
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Not currently, but we should be able to add this in and cleanup some of these differences between cartesian series soon.

  5. #5
    Sencha User
    Join Date
    May 2009
    Posts
    7
    Vote Rating
    0
    3dm is on a distinguished road

      0  

    Default


    thank you very much! you're doing a wonderful work!

  6. #6
    Ext JS Premium Member
    Join Date
    Nov 2009
    Location
    St Louis,MO
    Posts
    267
    Vote Rating
    18
    James Goddard will become famous soon enough James Goddard will become famous soon enough

      0  

    Default


    Actually this should probably be marked as fixed. You simply need to specify the axis as an array:

    axis: ['left', 'bottom']

Similar Threads

  1. How can i add a label for x-axis and y-axis for a chart?
    By madhu_g in forum Ext GWT: Discussion
    Replies: 7
    Last Post: 7 Jul 2014, 11:31 PM
  2. [FIXED] Chart - Line - Numeric Axes - problem
    By enpasos in forum Ext:Bugs
    Replies: 4
    Last Post: 16 Mar 2011, 1:26 AM
  3. Minimum 'floor' value for Y axis in charts...
    By drunkmoose in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 15 Dec 2010, 8:04 AM
  4. 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: 2