I am trying to change font colors of labels based on condition. My attempt is as below.
ticks: {
fontColor:'red',
userCallback: function (label, index, labels) {
if (!label.flag) {
//label.label[0] => set fontcolor of yellow
//label.label[1] => set fontcolor of blue
return label.label
} else {
return label.label
}
},
},
As in the above code I was able to add condition inside the ticks callback function and it's working fine. Now what I need is to add font colors as in the comments of the above code. Is there any way to access fontColor property inside ticks from callback method or any way to set different colors for the same label and render it?