Sets the Index Label’s Font color. The value of IndexLabelFontColor can be a “HTML Color Name” or “Hex Code”.
Default: “grey”var chart = new CanvasJS.Chart("container", { . . data: [{ indexLabelFontColor: "red", }, ] . . }); chart.render();
Also See:
6 Comments
can i put diferent colors to the diferents labels
inalbis09,
You can do the same by using indexLabelFontColor property of dataPoints.
I’m displaying label and y values. can i put different color for y and label ?
amutha,
It is not possible in indexLabel. But you can do the same inside toolTip.
Hi, Is it possible to give indexLabelFontColor to its related chart color?
Jacob,
As of now, we don’t have this option out of the box, but there is a easy workaround. Instead of setting indexLabelFontColor at the dataSeries level, you can set at the dataPoint level individually with matching color. You can refer to this link in our documentation. Here is a JSFiddle for your question.