You found a bug! We've classified it as EXTJS-10818 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Jan 2009
    Location
    Weinstadt
    Posts
    23
    Vote Rating
    1
    Graveworm is on a distinguished road

      0  

    Default Chart: Time Axis Entries Missing

    Chart: Time Axis Entries Missing


    Ext version tested:
    • Ext 4.2.1
    Browser versions tested against:
    • FF 22 (firebug 1.1.44 installed)
    • Chrome 28.0.1500.71
    Description:
    The time axis is not completly. There are some entries missing. It'll only occure when
    PHP Code:
    step:       [Ext.Date.MONTH2
    is configured.

    Steps to reproduce the problem:
    • See the code below
    The result that was expected:
    • A complete time axis
    The result that occurs instead:
    • missing entries on the time axis
    Test Case:
    I modified the example from ext-4.2.1/examples/charts/Line.html
    PHP Code:
    Ext.require(['Ext.data.*']);
    Ext.require(['Ext.data.*']);
    Ext.require('Ext.chart.*');
    Ext.require(['Ext.Window''Ext.fx.target.Sprite''Ext.layout.container.Fit''Ext.window.MessageBox']);

    Ext.onReady(function()
    {
        
    window.generateData = function(nfloor)
        {
            var 
    data = [], = (Math.random() * 11) + 1i;

            
    floor = (!floor && floor !== 0) ? 20 floor;

            for(
                
    0< (|| 22); i++
                )
            {
                var 
    dt Ext.Date.add(new Date('2012-01-01'), Ext.Date.MONTHi);
                
    data.push({
                    
    nameExt.Date.format(dt"Y-m-d") + "T" Ext.Date.format(dt"H:i:s") + "+01:00",
                    
    data1Math.floor(Math.max((Math.random() * 100), floor)),
                    
    data2Math.floor(Math.max((Math.random() * 100), floor)),
                    
    data3Math.floor(Math.max((Math.random() * 100), floor))
                });
            }
            return 
    data;
        };

        
    window.store1 Ext.create('Ext.data.JsonStore', {
            
    fields: ['name''data1''data2''data3'],
            
    data:   generateData()
        });

        
    window.loadTask = new Ext.util.DelayedTask();

        var 
    chart Ext.create('Ext.chart.Chart', {
            
    style:   'background:#fff',
            
    animatetrue,
            
    store:   store1,
            
    shadow:  true,
            
    theme:   'Category1',
            
    legend:  {
                
    position'right'
            
    },
            
    axes:    [
                {
                    
    type:           'Numeric',
                    
    minimum:        0,
                    
    position:       'left',
                    
    fields:         ['data1''data2''data3'],
                    
    title:          'Number of Hits',
                    
    minorTickSteps1,
                    
    grid:           {
                        
    odd: {
                            
    opacity:        1,
                            
    fill:           '#ddd',
                            
    stroke:         '#bbb',
                            
    'stroke-width'0.5
                        
    }
                    }
                },
                {
                    
    title:      'Month of the Year',
                    
    type:       'Time',
                    
    position:   'bottom',
                    
    fields:     ['name'],
                    
    dateFormat'M Y',
                    
    /**
                     * time axes seems to be buggy...
                     */
                    
    step:       [Ext.Date.MONTH2]
                }
            ],
            
    series:  [
                {
                    
    type:         'line',
                    
    highlight:    {
                        
    size:   7,
                        
    radius7
                    
    },
                    
    axis:         'left',
                    
    xField:       'name',
                    
    yField:       'data1',
                    
    markerConfig: {
                        
    type:           'cross',
                        
    size:           4,
                        
    radius:         4,
                        
    'stroke-width'0
                    
    }
                },
                {
                    
    type:         'line',
                    
    highlight:    {
                        
    size:   7,
                        
    radius7
                    
    },
                    
    axis:         'left',
                    
    smooth:       true,
                    
    xField:       'name',
                    
    yField:       'data2',
                    
    markerConfig: {
                        
    type:           'circle',
                        
    size:           4,
                        
    radius:         4,
                        
    'stroke-width'0
                    
    }
                },
                {
                    
    type:         'line',
                    
    highlight:    {
                        
    size:   7,
                        
    radius7
                    
    },
                    
    axis:         'left',
                    
    smooth:       true,
                    
    fill:         true,
                    
    xField:       'name',
                    
    yField:       'data3',
                    
    markerConfig: {
                        
    type:           'circle',
                        
    size:           4,
                        
    radius:         4,
                        
    'stroke-width'0
                    
    }
                }
            ]
        });

        var 
    win Ext.create('Ext.Window', {
            
    width:       800,
            
    height:      600,
            
    minHeight:   400,
            
    minWidth:    550,
            
    hidden:      false,
            
    maximizabletrue,
            
    title:       'Line Chart',
            
    renderTo:    Ext.getBody(),
            
    layout:      'fit',
            
    items:       chart
        
    });
    }); 
    Operating System:
    Last edited by Graveworm; 30 Jul 2013 at 12:25 AM. Reason: c and p error :(

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    3,831
    Vote Rating
    72
    Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

Thread Participants: 1

Tags for this Thread