How to change column width of a columns chart on开发者_运维百科e by one? I need charts like this:
_ __
| | ____ | |
| | | | | |
| | | | | |
|_| |____| |__|
...
series: [
{
type: 'column',
axis: 'left',
gutter: 10,
style: {
width: 50 //<-- Specify you Column width here
},
xField: 'title',
yField: ['totaltodotime', 'workdone'],
stacked: true,
...
- Ext JS documentation (http://docs.sencha.com/ext-js/4-0/#!/api/Ext.chart.series.Column-cfg-style) for Chart Series column has style as one of the configuration option.
- I added width attribute followed by required size.
renderer: function(sprite, record, attr, index, store) {
var color = selectedColor;
if (unique condition to identify the column ) {
return Ext.apply(attr, {
fill: color,
width: 100,x:50,y:50
});
}
else(another condition) {
return Ext.apply(attr, {
fill: color
,width: 50,
});
}
},
you can use record or index or store to identify the column being rendered
精彩评论