PDA

View Full Version : Chart autoSize



mkrakowski
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 },


Thanks!

mkrakowski
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?

Thanks!

slemmon
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.

mkrakowski
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!