Chart.js how to create chart wirhout y-axis for two data sets

36 Views Asked by At

I have two datasets for example (21, 22, 23) and (23, 24, 25) and I would like to present this sets in one line. I don't need y-axis, I tried to use line chart with option showLine: false set to false, but it seems not to be right approach.

I've created mock how it should look;

I've created mock how it should look

1

There are 1 best solutions below

0
LeeLenalee On

Define your points according to the point input https://www.chartjs.org/docs/latest/charts/line.html#point by setting the x value to your value and the y value to -1 or 1 and then disable the yAxes you will get what you want