[Chartjs]-React-chartjs-2 keep x axis always 0% to 100%

5👍

Looking at the docs for the Chart component options they point to the Chart.js docs where the max scale is set under a scale attribute, you have it inside the ticks property, try:

...
  x: {
    ticks: {
      color: "white",
      beginAtZero: true,
    },
    grid: {
      display: false, // Hide x grid
    },
    max: 100,
  },
...

Leave a comment