Hi, All!
I need to paint particular markers of some series into other color then defined in markerConfig option during series creation. So, according to help, I can use my own series renderer:
renderer : Function
A function that can be overridden to set custom styling properties to each rendered element. Passes in (sprite, record, attributes, index, store) to the function.
Series configuration:
Code:
{
title: displayName,
type: 'line',
axis: 'left',
xField: 'name',
yField: yField,
highlight: false,
showMarkers: true,
selectionTolerance: 3,
renderer: this.seriesRenderer
}
Series renderer:
Code:
seriesRenderer: function(sprite, record, attributes, index, store){
Ext.apply(attributes, {fill: "FF0000", stroke: "FF0000"});
return attributes;
}
Looks like attributes returned from my renderer does not work. I've tried to change style of sprite(marker) within renderer function, but this didn't help too:
Code:
seriesRenderer: function(sprite, record, attributes, index, store){
sprite.setAttributes({fill: "FF0000", stroke: "FF0000"}, true);
return attributes;
}
Does anybody know what is wrong?