I'm trying to use the addCls() method for sprites to change the color of a scatter plot point once it has been clicked on. So far, my code changes the color of the highlight that comes up when you mouse-over the point but not the color of the point itself.
Here is my itemclick listener, defined under the series config in the chart definition.
listeners: {
itemclick: function(record, o){
console.log(record.sprite);
record.sprite.addCls('green-sprite');
}
}
My css for the class 'green-sprite' looks like this:
.green-sprite{
stroke: rgb(0,100,0) !important;
fill: rgb(0,100,0) !important;
color: #99CC99 !important;
}
Any tips would be much appreciated!