fordprefect
16 Feb 2012, 12:53 PM
Hi,
I'm attempting to hide a series in a column chart without much succcess. Here's how my chart series is defined:
series: [{
type: 'column',
axis: 'left',
highlight: true,
tips: {
trackMouse: true,
width: 140,
height: 28,
renderer: function(storeItem, item) {
this.setTitle(storeItem.get('name') + ': ' + storeItem.get('data1') + ' $');
}
},
label: {
display: 'insideEnd',
'text-anchor': 'middle',
field: 'data1',
renderer: Ext.util.Format.numberRenderer('0'),
orientation: 'vertical',
color: '#333'
},
xField: 'name',
yField: ['data1', 'data2']
}
I've been able to hide the first item in the series with:
chart.series.get(0).hideAll();
However I can't hide any other item in this series. When I query the series yField I see 2 items: 'data1', 'data2'
Does anyone know how I can hide the second yField item? Perhaps my series setup is incorrect.
Thanks.
I'm attempting to hide a series in a column chart without much succcess. Here's how my chart series is defined:
series: [{
type: 'column',
axis: 'left',
highlight: true,
tips: {
trackMouse: true,
width: 140,
height: 28,
renderer: function(storeItem, item) {
this.setTitle(storeItem.get('name') + ': ' + storeItem.get('data1') + ' $');
}
},
label: {
display: 'insideEnd',
'text-anchor': 'middle',
field: 'data1',
renderer: Ext.util.Format.numberRenderer('0'),
orientation: 'vertical',
color: '#333'
},
xField: 'name',
yField: ['data1', 'data2']
}
I've been able to hide the first item in the series with:
chart.series.get(0).hideAll();
However I can't hide any other item in this series. When I query the series yField I see 2 items: 'data1', 'data2'
Does anyone know how I can hide the second yField item? Perhaps my series setup is incorrect.
Thanks.