EDITED I am using Sencha touch charts sample provided for column charts. The code is as below
new Ext.chart.Panel({
fullscreen: true,
I solved this issue with the help of a Sencha folk. Thanks Dan. Here is the solution:
Structure the json data as below
{
"data": [
{
"School": "Dukes",
"wins": "3"
},
{
"School": "Emmaus",
"wins": "10"
},
{
"School": "Maryland",
"wins": "5"
},
{
"School": "Virginia",
"wins": "2"
}
]
}
Use the below data store
window.store1 = new Ext.data.Store({
model: 'Details',
proxy: {
type: 'ajax',
url: 'GetDataset.json',
reader: {
root: 'data',
type: 'json'
}
},
autoLoad: true
});
I'm guessing here, but it seems like a problem I've had before. I believe the problem is with the proxy. Try:
proxy: {
type: 'rest',
url: 'http://localhost:2650/AjaxWCFService.svc/GetDataset',
reader: {
root: 'data'
}
},
Now, you need to define the callback function for the proxy. There's an elegant way with some config, but I honsetly don't know how to do that, so I found out a different solution at the time, the hard way, which is to wrap the JSON which your service returns inside of(like they do here):
Ext.data.JsonP.callback1();
If none of that works, also consider adding the following to your proxy, and emitting a 'total' as part of your JSON response.
totalProperty: 'total'
But keep in mind that I really don't think this will help much at all and that I'm just throwing these ideas out based on a working sample I have.
Try reading this and this. And most of all good luck, that's all of the top of my head mate. Also have a look at this post.
I hope that points you in the right direction. Like I said, I'm not sure, this is my best guess. I'm probably wrong.
Cheers rivanov