Extjs4 not chart plotting data correctly

I created a simple line chart in Extjs4 for one of my projects, and the chart is not plotting the right data.

enter image description here

The chart uses the same store as the grid, but not showing the same data. Is there any way to trace the source of the problem, if not fixing it altogether?

The following is the code I use to generate the chart.

{
    xtype: 'chart',
    animate: true,
    shadow: true,
    store: 'Dataalls',
    legend: {
        position: 'top'
    },
    axes: [{
        type: 'Numeric',
        position: 'left',
        title: 'Wind Speed',
        fields: ['windspeed'],
        grid: true
    }, {
        type: 'Category',
        position: 'bottom',
        title: 'Time',
        fields: ['time']
    }],
    series: [{
        type: 'line',
        axis: 'left',
        xField: ['time'],
        yField: ['windspeed']
    }]
}

(I tried using type: ‘Time’ for the x axis but gets the error “date.getFullYear is not a function” )

This entry was posted in Codes & Scripts and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>