Chartjs-Change font colour of data labels on bar chart – chartsjs-plugin-data-labels

0👍

The problem was due to the ‘chartsjs-plugin-data-labels’ plugin i had. Fixed it by adding this to the datasets array.

        dataLabels: {
          colors: ["white"],
        },

0👍

I think the issue is because you add the baels plugin config inside the legend configuration.

It should be:

  options: {
  ...
    plugins: {
      labels: {
        fontColor: "black",
        fontSize: 12,
      },
    }
  ...
  }

Leave a comment