crummy
31 Aug 2012, 4:05 PM
I create a new sprite unitCircle and it to my scatter chart surface:
window.unitCircle = new Ext.draw.Sprite({
id : 'window.unitCircle',
type : 'circle',
radius : window.unitRadius,
fill : 'none',
stroke : 'red',
'stroke-width' : 1,
opacity : 0.09,
'stroke-opacity' : 1,
x : window.centerPosX,
y : window.centerPosY
});
Ext.Function.defer(function() {
scatChart.surface.add(window.unitCircle)
.show(true)
}, 50, this);
How do I subsequently remove the sprite unitCircle from my scatter chart scatChart.surface?
scatChart.surface.remove(window.unitCircle) results in error: Cannot call method 'onRemove' of undefined ,despite a check to remove the circle only when window.unitCircle is defined.
Any suggestions?
window.unitCircle = new Ext.draw.Sprite({
id : 'window.unitCircle',
type : 'circle',
radius : window.unitRadius,
fill : 'none',
stroke : 'red',
'stroke-width' : 1,
opacity : 0.09,
'stroke-opacity' : 1,
x : window.centerPosX,
y : window.centerPosY
});
Ext.Function.defer(function() {
scatChart.surface.add(window.unitCircle)
.show(true)
}, 50, this);
How do I subsequently remove the sprite unitCircle from my scatter chart scatChart.surface?
scatChart.surface.remove(window.unitCircle) results in error: Cannot call method 'onRemove' of undefined ,despite a check to remove the circle only when window.unitCircle is defined.
Any suggestions?