Please, i have been searching every where for someone to help me out cos it has not been possible for me to present the data sent to my sencha pie chart from the json data store i created for this purpose :


I am displaying the below result from a printed form of my variable array countaining the following set of value:
Array ([0] => Array ( [0] => 19 [nombre] => 19 [1] => Chargé de mission [type] => Charge de mission )[1] => Array ( [0] => 204 [nombre] => 204 [1] => Pré-adhérent [type] => Pre-adherent )[2] => Array ( [0] => 1 [nombre] => 1 [1] => Administrateur [type] => Administrateur )[3] => Array ( [0] => 25 [nombre] => 25 [1] => Auto-entrepreneur [type] => Auto-entrepreneur )[4] => Array ( [0] => 1157 [nombre] => 1157 [1] => Adhérent [type] => Adherent )[5] => Array ( [0] => 429 [nombre] => 429 [1] => Salarié [type] => Salarie ))


meanwhile to send it to my sencha pie i have use the json encode as bellow:


{"success":true,"total":"0","data":[{"0":"19","nombre":"19","1":null,"type":"Charge de mission"},{"0":"204","nombre":"204","1":null,"type":"Pre-adherent"},{"0":"1","nombre":"1","1":"Administrateur","type":"Administrateur"},{"0":"25","nombre":"25","1":"Auto-entrepreneur","type":"Auto-entrepreneur"},{"0":"1157","nombre":"1157","1":null,"type":"Adherent"},{"0":"429","nombre":"429","1":null,"type":"Salarie"}]}


However to have it displayed by the sencha pie i have set my code as follow :


var userStore = new Ext.data.JsonStore({
url: 'rapport/chartTypeProfils.php',
fields: [{name:'nombre' ,type:'int'},'type'],
root: 'data'
//totalProperty:'total'


});






userPie= Ext.extend( Ext.ux.Portlet,{
constructor: function(config) {
Ext.apply(this, {
//width: 400,
height: 300,
title: 'Utilisateur',
tools: tools,
//renderTo: 'user',
items: {
itemId: 'userStore',
store: userStore,
xtype: 'piechart',
dataField: 'nombre',
categoryField: 'type',
//extra styles get applied to the chart defaults
extraStyle:
{
legend:
{
display: 'left',
padding: 5,
font:
{
family: 'Tahoma',
size: 13
}
}
}
}
});
userPie.superclass.constructor.apply(this, arguments);
}
});


but it doesn't seem to work as to display the wanted pie.....