PDA

View Full Version : Trying to populate chart from Calendar selection



mjhaston
20 May 2010, 6:47 AM
I select the date, hit the apply button, watch the post in Firebug, watch the response in Firebug ....

... but my chart does not appear. I assume I don't have the two pieces of the puzzle talking to each other?

Any help is always appreciated.






Ext.chart.Chart.CHART_URL = 'charts.swf';
Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif';

Ext.onReady(function(){


var apply = new Ext.Button({
text: "Apply Filters",
iconCls: 'find',
handler: function(){
store.baseParams = {
inputDate: Ext.getCmp('inputDate').getRawValue()
};
store.load({
params: {
inputDate: Ext.getCmp('inputDate').getRawValue()
}
});
}
});


var store = new Ext.data.JsonStore({
url: '/cgidev2p/r_fillrate.pgm',
autoLoad: false,
root: 'data',
fields: [{
name: 'warehouse',
type: 'string'
}, {
name: 'orders',
type: 'int'
}, {
name: 'backOrders',
type: 'int'
}]
});


//store.load();

// extra extra simple
new Ext.Panel({
title: 'Fill Rate',
renderTo: 'container',
width: 700,
height: 450,
layout: 'fit',
tbar: [{
xtype: 'datefield'
, format: 'm/d/Y'
, name: 'inputDate'
, id: 'inputDate'
}, apply ],

items: {
xtype: 'stackedbarchart',
store: store,
yField: 'warehouse',
xAxis: new Ext.chart.NumericAxis({
stackingEnabled: false
, title: "Quantities"
}),
// yAxis: new Ext.chart.NumericAxis({
// title: 'Warehouse'
// }),
extraStyle: {
yAxis: {
titleRotation: -90
}
},
series: [{
xField: 'backOrders',
displayName: 'Back Orders for '
},{
xField: 'orders',
displayName: 'Orders for '

}]
}

});
});

Manish Singhal
2 Jan 2014, 10:53 PM
i am also trying to do the same kind of thing.. can anyone help on it.