[Chartjs]-Is there any way to change the font color and size of labels in Chartjs 3.0.0

0👍

The propertys have changed in naming in v3 see migration guide (https://www.chartjs.org/docs/master/getting-started/v3-migration) and the font docs (https://www.chartjs.org/docs/master/general/fonts) for more info:

Example:

var options = {
  type: 'line',
  data: {
    labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
    datasets: [{
        label: '# of Votes',
        data: [12, 19, 3, 5, 2, 3],
        borderWidth: 1
      },
      {
        label: '# of Points',
        data: [7, 11, 5, 8, 3, 7],
        borderWidth: 1
      }
    ]
  },
  options: {
    plugins: {
      legend: {
        labels: {
          font: {
            size: 20
          },
          color: 'red',
        }
      }
    }
  }
}

var ctx = document.getElementById('chartJSContainer').getContext('2d');
new Chart(ctx, options);
<body>
  <canvas id="chartJSContainer" width="600" height="400"></canvas>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.0.0-beta.12/chart.js" integrity="sha512-KTkh8VBBRBzCXlXeR49sBgmLkU6CE7li47A70NR+yYMKGEDOfQR4L2PEQ3KRXeET8j1U+gSRpRjkAS4tQjTGag==" crossorigin="anonymous"></script>
</body>

Leave a comment