Chartjs-Why Ticks Not Working in Chart.js but everything is correct?

0👍

One quick solution is to change your chart type to scatter and set showLine to True. The scatter chart automatically uses linear axes for both x and y.

new Chart("myChart", 
{
  type: "scatter",
  data: 
  {
    labels: xValues,
    datasets: [{
      label: "Size",
      data: sizeArray,
      borderColor: "green",
      fill: false,
      showLine: true,
      tension: 0.15
    }]
  },...

Here is a DEMO

Leave a comment