Hi, I am not sure if this is reported as a bug but I am looking for some help to display the pie chart. The pie chart creation , its data store and the JSON response is shown below.
Code:
var piecht = new Ext.Panel({
iconCls:'chart',
title: 'ExtJS.com',
frame:true,
width:600,
height:300,
layout:'fit',
items: {
xtype: 'piechart',
store: firstchartstore,
dataField: 'value'
},
url:'/ext-3.0-rc1/resources/charts.swf'
});
var firstchartstore = new Ext.data.JsonStore(
{
fields: [
,{name: 'key', type: 'string'}
,{name: 'value', type: 'int'}
],
root: 'firstchart.chartData'
});
function LoadAndShow(combovalue,clientcombo){
firstchartstore.on('load', loadSuccessfulChart);
piecht.render(document.getElementById('pchart'));
-- prepare the URL String
Ext.Ajax.request({
url: urlStr,
success: function(response) {
var data = Ext.decode(response.responseText);
firstchartstore.loadData(data);
}
});
}
function loadSuccessfulChart(store, recordArray, options) {
alert("chart store loaded");
}
JSON RESPONSE -
{"firstchart":{"chartData":[{"key":"BLACKRCK","value":2983},{"key":"GSAM2","value":542}],"message":"Successfully
retrieved chart data","success":true}}