Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-5954 in a recent build.
  1. #1
    Ext JS Premium Member
    Join Date
    Feb 2010
    Location
    Chicago, IL
    Posts
    6
    Vote Rating
    0
    GeoChing is on a distinguished road

      0  

    Default Simple Area Chart Not Working

    Simple Area Chart Not Working


    Hi,
    Here is code that used to work in 4.0.7, but does not work with 4.1 RC3. Is this a bug?

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
        <title>ExtJS4 Test</title>
        <link rel="stylesheet" type="text/css" href="resources/js/extjs/resources/css/ext-all.css"/>
        <script type="text/javascript" src="resources/js/extjs/ext-all.js"></script>
        <script type="text/javascript">
            Ext.onReady(function() {
                var dateFormat = 'd M',
                    toDate = new Date(),
                    fromDate = Ext.Date.add(toDate, Ext.Date.MONTH, -1);
    
                Ext.create('Ext.Window', {
                    width: 1024,
                    height: 205,
                    minHeight: 205,
                    minWidth: 800,
                    hidden: false,
                    shadow: false,
                    maximizable: true,
                    title: 'Usage Statistics',
                    renderTo: Ext.getBody(),
                    layout: 'fit',
                    items: Ext.create('Ext.chart.Chart', {
                        adjustMinimumByMajorUnit: 0,
                        store: Ext.create('Ext.data.JsonStore', {
                            fields: [
                                {name: 'date', type: 'date', dateFormat: 'time'},
                                {name: 'logins', type: 'int'}
                            ],
                            data: [{"date":1331917128599,"logins":1},{"date":1332003528599,"logins":0},{"date":1332089928599,"logins":0},{"date":1332176328599,"logins":1},{"date":1332262728599,"logins":1},
                                   {"date":1332349128599,"logins":2},{"date":1332435528599,"logins":4},{"date":1332521928599,"logins":1},{"date":1332608328599,"logins":0},{"date":1332694728599,"logins":0},
                                   {"date":1332781128599,"logins":2},{"date":1332867528599,"logins":2},{"date":1332953928599,"logins":3},{"date":1333040328599,"logins":3},{"date":1333126728599,"logins":2},
                                   {"date":1333213128599,"logins":0},{"date":1333299528599,"logins":0},{"date":1333385928599,"logins":3},{"date":1333472328599,"logins":1},{"date":1333558728599,"logins":2},
                                   {"date":1333645128599,"logins":2},{"date":1333731528599,"logins":0},{"date":1333817928599,"logins":0},{"date":1333904328599,"logins":0},{"date":1333990728599,"logins":0},
                                   {"date":1334077128599,"logins":1},{"date":1334163528599,"logins":2},{"date":1334249928599,"logins":3},{"date":1334336328599,"logins":1},{"date":1334422728599,"logins":0},
                                   {"date":1334509128599,"logins":0},{"date":1334595528599,"logins":0}]
                        }),
                        axes: [
                            {
                                type: 'Numeric',
                                position: 'left',
                                fields: 'logins',
                                grid: true,
                                minimum: 0,
                                decimals: 0
                            },
                            {
                                type: 'Time',
                                position: 'bottom',
                                fields: 'date',
                                dateFormat: dateFormat,
                                constrain: true,
                                fromDate: fromDate,
                                toDate: toDate
                            }
                        ],
                        series: [
                            {
                                type: 'area',
                                axis: 'left',
                                highlight: true,
                                tips: {
                                    anchor: 'right',
                                    trackMouse: true,
                                    width: 160,
                                    height: 28,
                                    renderer: function(store) {
                                        if( store) {
                                            var date = store.get('date'),
                                                logins = store.get('logins'),
                                                title = Ext.Date.format(date, 'd M, Y') + ': ' + logins + ' login(s)';
                                            this.setTitle(title);
                                        }
                                    }
                                },
                                xField: 'date',
                                yField: 'logins',
                                style: {
                                    opacity: '0.60'
                                }
                            }
                        ]
                    })
                });
            });
        </script>
    </head>
    <body>
    
    </body>
    </html>

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,868
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Thank you for the report.

    Regards,
    Scott.

Thread Participants: 1