PDA

View Full Version : autosize chart



Jeka57
22 Nov 2012, 10:08 AM
hi! sorry for my english :"> I'm trying to make a chart(ext 4.1):

var chart = Ext.create('Ext.chart.Chart', { width: 280, height: 230, animate: true, autoSize: true, shadow: true, store: storeChart2, renderTo: 'chart2', legend: {//position: 'right' }, theme: 'Base:gradients', series: [{ type: 'pie', field: 'data', showInLegend: false, highlight: { segment: { margin: 20 } }, tips: { trackMouse: true, width: 100, renderer: function(storeItem, item) { this.setTitle(storeItem.get('name') + ': ' + Math.round(all * storeItem.get('data') / 100) +' ('+ Math.round(storeItem.get('data') / 100 * 100) + '%)'); } }, label: { field: 'name', display: 'rotate', contrast: true, font: '12px Arial' } }]});


autoSize: true, - dont work. In Chrome console:
Error: Invalid value for <svg> attribute width="-Infinity"
Error: Invalid value for <svg> attribute height="-Infinity"Whats wrong?

mitchellsimoens
24 Nov 2012, 6:32 AM
You have autoSize to true but still giving it a height and width?

Jeka57
25 Nov 2012, 1:05 PM
If I remove the width and height, the chart is constructed as follows:40318