1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    7
    Vote Rating
    0
    tamias is on a distinguished road

      0  

    Default Ext.chart.axis.Time

    Ext.chart.axis.Time


    Hello everybody,

    I would like to use the type 'time' for the xAxis of a chart.
    Here is the code:

    Code:
    Ext.define('MainApp.view.tools.ChartLinesView', {
        extend: 'Ext.chart.Chart',
        alias : 'widget.chartlines',
        height: 229,
        width: 722,
        animate: true,
        insetPadding: 20,
        store: 'FactureStore',
    
          initComponent: function() {
            var me = this;
            me.axes = [
                {
                    type: 'Time',
                    fields: 'Date_index',
                    title: 'Mois',
                    position: 'bottom',
                    dateFormat: 'M',
                    groupBy: 'month',
                    aggregateOp: 'sum',
                    constrain: true,
                    fromDate: new Date('1/1/11'),
                    toDate: new Date('1/7/11')
                },
                  {
                    type: 'Numeric',
                    fields: [
                          'Montant_net'
                    ],
                    position: 'left',
                    title: 'Montant net'
                  }
            ];
                me.series = [
                  {
                    type: 'columns',
                    xField: 'Date_index',
                    yField: [
                      'Montant_net'
                    ],
                    smooth: 3
                  }
            ];
            me.callParent(arguments);
          }
    });
    In Firebug, i have the following error :

    a.getMonth is not a function
    http://localhost/EnergyWatch/app/ext4/ext-all.js
    Line 1

    What i'm doing wrong?

    Thank you very much for your help!

  2. #2
    Ext JS Premium Member
    Join Date
    Jul 2010
    Location
    UK
    Posts
    524
    Vote Rating
    29
    MrSparks has a spectacular aura about MrSparks has a spectacular aura about

      0  

    Default


    Looking at the docs, I think you need to use a different date format.

    fromDate: new Date(2011, 1, 1),
    toDate: new Date(2011, 1, 7),

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."