1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    6
    Vote Rating
    1
    MaartenTutak is on a distinguished road

      1  

    Default Unanswered: Time axis broken?

    Unanswered: Time axis broken?


    I'm trying to use a time axis in one of my charts on my current project, but it's just not working.

    The chart configuration and the data provided are both correct because the chart will work when using a category axis instead of a time axis.

    When using the time axis, the date labels will be rendered, but the data on the chart is not shown. Is there any solution to this?

    I'm doing something very similar on an Ext JS project and it worked there, so i'm not sure why it's not working now.

    I've included a snippet of the chart i'm trying to use.

    Code:
    Ext.define('Test.view.charts.RealtimeCpuChart', {
        extend: 'Ext.Container',
    
    
        requires: [
            'Ext.chart.interactions.PanZoom',
            'Ext.chart.interactions.ItemHighlight',
            'Ext.chart.CartesianChart',
            'Ext.chart.axis.Numeric',
            'Ext.chart.axis.Time',
            'Ext.chart.series.Line'
        ],
    
    
        xtype: 'realtimeCpuChart',
    
    
        config: {
            layout: {
                type: 'fit'
            },
            items: [
                {
                    xtype: 'chart',
                    store: 'cpuStore',
                    animate: true,
                    series: [
                        {
                            type: 'line',
                            xField: 'logged_date',
                            yField: 'load', title: 'Cpu Usage',
                            style: {
                                stroke: '#ED1C24', lineWidth: 2
                            },
                            highlightCfg: {
                                scale: 2
                            },
                            marker: {
                                type: 'circle', stroke: '#ED1C24',
                                fill: '#515151', lineWidth: 1,
                                radius: 3, shadowColor: 'rgba(0,0,0,0.7)',
                                shadowBlur: 10, shadowOffsetX: 3,
                                shadowOffsetY: 3,
                                fx: {
                                    duration: 100
                                }
                            }
                        }
                    ],
                    axes: [
                        {
                            type: 'numeric',
                            fields: ['load'],
                            position: 'left',
                            grid: {
                                odd: {
                                    fill: 'lightgray'
                                }
                            },
                            style: {
                                axisLine: true,
                                stroke: 'lightgray'
                            },
                            title: {
                                text: 'Cpu Usage %',
                                fontSize: 15
                            },
                            minimum: 0,
                            maximum: 100
                        },
                        {
                            type: 'time',
                            position: 'bottom',
                            dateFormat: 'H:i:s',
                            fields: ['logged_date'],
                            style: {
                                stroke: 'lightgray'
                            },
                            label: {
                                rotate: {
                                    degrees: 315
                                }
                            }
                        }
                    ]
                }
            ]
        }
    Last edited by MaartenTutak; 26 May 2013 at 11:59 PM. Reason: Included code examples

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..." hd porno faketaxi