I Use below code to load data from database using data.php file but its not getting data:-
var store = new Ext.data.Store({
proxy : new Ext.data.HttpProxy({
url : 'data.php'
}),
reader : new Ext.data.JsonReader({
root : 'data',
fields:[{date: 'date'},
{value: 'value'}]
})
});
store.load();
By Using temporary data as below its getting:-
var store = new Ext.data.JsonStore({
fields:['date', 'pcs'],
data:[
{date:'Jul 07', value: '1000'},
{date:'Aug 07', value: '2000'},
{date:'Sep 07';, value: '4000'},
{date:'Oct 07';, value: '6000'},
{date:'Nov 07', value: '8000'},
{date:'Dec 07';, value: '9000'},
{date:'Jan 08', value: '10000'},
{date:'Feb 08', value: '12000'}
]
});
And i Assinged the store value to linechart as below:-
{
xtype: 'linechart',
store: store,
url: '/ext/resources/charts.swf',
xField: 'date',
yField: 'value',
}