Chartjs-How to change font color of labels react-chartjs-2 with V4.3.1

1👍

Assuming you want to change the font color of the tick labels, this can be done through the axes ticks configuration as follows.

const options = {
  scales: {
    x: {
      ticks: {
        color: 'black'
      }
    },
    y: {
      ticks: {
        color: 'black'
      }
    }
  }
};

...

<Bar options={options} data={data} />;

For further details, please consult Tick Configuration from the Chart.js documentation

Leave a comment