Chartjs-The options don't work when creating my chart using chartjs (4.3.0) with react-chartjs-2 (5.2.0)

0👍

About color, your chart options are wrong because you defined scales inside the plugins and that’s wrong.
The correct is:

  const barOptions = {
    options: {
      scales: {
        x: {
          ticks: {
            color: '#ffffff',
          },
        },
        y: {
          type: 'time',
          time: {
            unit: 'hour',
          },
          ticks: {
            color: 'white',
          },
        },
      },
    },
  };

IMO it’s better to submit a question for a specific topic and not put many topics in the same question as you did 😉

Leave a comment