I would like to use the type 'time' for the xAxis of a chart.
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);
}
});