Chartjs-Chart.JS Legend custom color change

1👍

✅

Looks like you should use fillStyle instead of fontColor to customize the label text color above each point.

ctx.fillStyle = '#000';

for this section:

meta.data.forEach(function (bar, index) {
  var data = dataset.data[index];
            
  ctx.fillText(data, bar._model.x, bar._model.y - 5);
  ctx.fillStyle = '#000';
});

Demo @ StackBlitz

Leave a comment