PDA

View Full Version : Extjs chart



Arunsoccer
26 Mar 2012, 3:16 AM
Hi can anyone help me in this by using the store value i need to draw barchart with two columns

mitchellsimoens
26 Mar 2012, 8:03 AM
You should be able to use the bar chart example and have multiple fields.

Arunsoccer
26 Mar 2012, 8:36 PM
I have done that bar chart but its displaying the empty panel.
The chart is not rendered .Am using extjs 3.0.1 version

Arunsoccer
26 Mar 2012, 8:42 PM
var store = new Ext.data.JsonStore({
fields: ['year', 'comedy', 'action'],

data: [
{year: 2005, comedy: 34000000, action: 23890000},
{year: 2006, comedy: 56703000, action: 38900000},
{year: 2007, comedy: 42100000, action: 50410000},
{year: 2008, comedy: 38910000, action: 56070000}
]
});
var obj = new Ext.Panel({
layout : 'fit',
height : 280,
autoScroll : true,
border : false,
frame : false,
region: 'center',
items: {
xtype: 'BarChart',
store: store,
xField: 'year',
yAxis: new Ext.chart.NumericAxis({
title:'Weight ',
majorUnit: 500
}),
series: [{
yField: 'comedy',
displayName: 'Comedy'
},{
yField: 'action',
displayName: 'Action'
}]
},
items : [ graphView.getChart(opts) ]
});
this is my coding for my bar chart

mitchellsimoens
27 Mar 2012, 4:22 AM
Am using extjs 3.0.1 version

Please post in the correct forum. You posted in Ext JS 4 Q&A forum where charts are completely different. I have moved this to the Ext JS 3 Help forum

Arunsoccer
27 Mar 2012, 5:39 AM
sorry for the inconvenience am new in this area.Can u say me on how to do this chart .I have displayed my coding above post .Its just displaying the empty panel.Please refer below image