'Alter values of xAxis in chartjs

I'm trying to make a logarithmic chart, and here the full example of what I tried:

https://codesandbox.io/s/friendly-frog-qnqvii?file=/App.tsx:346-357

What I still need is to display the xAxis with a step of 2 like in this chart:

enter image description here

Please notice that the max value of the chart grid is '26' and not '24' and the min value is 10 instead of 12.

How can I acheive this ?



Solution 1:[1]

This should work

...
  scales: {
    x: {
      type: "logarithmic",
      min: 12,
      max: 24
    },
...

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 tauzN