Hi,
I already corrected the mistake you mentionned, but there's no change still the same mistake..
Here's the view I want to display:
Code:
Ext.define('TAB.view.StandardGraph', { extend: 'Ext.chart.Chart',
alias: 'widget.standardgraph',
store: 'StandardGraphStore',
width: 300,
height: 150,
axes: [ {
title: 'Temperature',
type: 'Numeric',
position: 'left',
fields: ['temperature'],
minimum: 0,
maximum: 100
},
{
title: 'Time',
type: 'Time',
position: 'bottom',
fields: ['date'],
dateFormat: 'ga'
}],
series: [
{
type: 'line',
xField: 'date',
yField: 'temperature'
}
]
});
Here's the controller that should display it when clicking on the button
Code:
Ext.define('TAB.controller.GraphOptions', { extend: 'Ext.app.Controller',
views: ['GraphOptions','StandardGraph'],
init: function () {
var me = this;
this.control({
'#generateChart': {
click: this.generateChart
},
})
},
generateChart: function (value){
Ext.widget('standardgraph').show();
}
});
Still don't know why the store is null, I modified my store, it's now a static store:
Code:
Ext.define('TAB.store.StandardGraphStore', { extend: 'Ext.data.Store',
requires: 'TAB.model.StandardGraphModel',
model: 'TAB.model.StandardGraphModel',
// storeId: 'StandardGraphStore',
data: [
{ temperature: 58, date: new Date(2011, 1, 1, 8) },
{ temperature: 63, date: new Date(2011, 1, 1, 9) },
{ temperature: 73, date: new Date(2011, 1, 1, 10) },
{ temperature: 78, date: new Date(2011, 1, 1, 11) },
{ temperature: 81, date: new Date(2011, 1, 1, 12) }
]
/* proxy: {
type: 'ajax',
url: 'app/data/GridsLoader.cfc?method=getMetrSeries&returnformat=json',
reader: {
type: 'json',
root: 'DATA'
}
}*/
});