indexLabelFontColor: String

Sets the Index Label’s Font color. The value of IndexLabelFontColor can be a “HTML Color Name” or “Hex Code”.


Default: “grey”
Example: “red”, “#FAC003” ..

var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
 data: [{
  indexLabelFontColor: "red",

  },
 ]
 .
 .
});
chart.render();


Try it Yourself by Editing the Code below.



If you have any questions, please feel free to ask in our forums.Ask Question

Comments 6

    • 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.

If you have any questions, please feel free to ask in our forums. Ask Question