var encClinic = new Ext.chart.StackedBarChart({
store: new Ext.data.Store({
reader:encReader,
url:data.jsonUrl,
baseParams:{
cmd:'OHMjson.Graph',
graphNam开发者_JAVA百科e:'ENC',
graphType:'Clinics'
}
}),
yField: 'CLINIC',
xAxis: new Ext.chart.NumericAxis({
stackingEnabled: true,
title: text.occurrences
})
});
I am displaying some values here, i need to debug by displaying an alert here whether the data retrieved are correct or not.
Can anyone explain me the code too.
Here is the code for what Lloyd is talking about. I have added an exception listener and a load listener for you. Since I don't have the data, the particulars of what is inside of records.data will probably need some tweaking to get it to work right for you.
var encClinic = new Ext.chart.StackedBarChart({
store: new Ext.data.Store({
reader:encReader,
url:data.jsonUrl,
baseParams:{
cmd:'OHMjson.Graph',
graphName:'ENC',
graphType:'Clinics'
},
listeners : {
exception : function(misc) {
//Exception Handling Here
//Handle your load failures here
},
load : function(this, records, opts) {
//evaluate to see if your data is "correct"
alert(records.data.toString());
}
}),
yField: 'CLINIC',
xAxis: new Ext.chart.NumericAxis({
stackingEnabled: true,
title: text.occurrences
})
});
精彩评论