Basically, I have a chart with data labels that are months, and depending on other data I want to dynamically set the label color.I tried doing so with HTML but that does not seem to work, here is an example:
"categories": [{
"category": [{
"label": "<span style='color:red;'>" + months[0] + "</span>"
}, {
"label": "<span style='color:green;'>" + months[1] + "</span>"
}]
}],
But the HTML just gets encoded or something and is displayed as is.
What can I do to set different colors for each label?
Eran Bodokh
Basically, I have a chart with data labels that are months, and depending on other data I want to dynamically set the label color.
I tried doing so with HTML but that does not seem to work, here is an example:
"categories": [{
"category": [{
"label": "<span style='color:red;'>" + months[0] + "</span>"
}, {
"label": "<span style='color:green;'>" + months[1] + "</span>"
}]
}],
But the HTML just gets encoded or something and is displayed as is.
What can I do to set different colors for each label?