开发者

extJs Alert Help

开发者 https://www.devze.com 2023-01-17 16:41 出处:网络
var encClinic = new Ext.chart.StackedBarChart({ store: new Ext.data.Store({ reader:encReader, url:data.jsonUrl,
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
    })
});
  1. I am displaying some values here, i need to debug by displaying an alert here whether the data retrieved are correct or not.

  2. 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
})

});

0

精彩评论

暂无评论...
验证码 换一张
取 消