View Full Version : Chart autoSize

21 Apr 2013, 5:31 PM
Hi All,

I would like to be able to define my chart width to auto scale.

var chart = Ext.create('Ext.chart.Chart', {
// width: 750,
height: 300,
viewBox : true,
autoSize : true,
animate : { easing: 'bounceOut', duration: 750 },


22 Apr 2013, 8:57 AM
I will try to rephrase, is it possible to set the size of the bar chart to the size of the parent panel?


23 Apr 2013, 11:30 AM
If the chart is the sole child component of a parent container you can config the parent container with layout: 'fit' and the chart will always take up all available space in the parent container.

23 Apr 2013, 11:49 AM
Thank you.

I had two components within a "parent" panel, but creating a secondary wrapper panel just for the chart fixed the issue!