Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I Use below code to load data from database using data.php file but its not getting data:-
JavaScript
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:-
JavaScript
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:-

JavaScript
{
                    xtype: 'linechart',
                    store: store,
                    url: '/ext/resources/charts.swf',
                    xField: 'date',
                    yField: 'value',
                   }
Posted
Updated 8-Mar-12 21:26pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900