[Chartjs]-Single Point Curve Chart.js

1👍

I was going about this the wrong way. Three points are needed to make a curve. I’m only trying to display a single point on the line, but there needs to a first and third point to get the curve.

0👍

Interestingly you can hide the points by specifying a negative y value:

{
   x: 9,
   y: -1
}

But as you’ve tried a negative x value just defaults to 0. I am not sure if this helps but if you change some of the values in you chart you can hide both outer points by specifying a y value that higher than the chart for the first point and lower than the chart for the second point.

Have a look at this fiddle. You may want to play with the values to make it look as you require but it does hide the first and third points while still giving you the curve.

Just a side note as well — decimal values work for making it closer to the axis:

{
    x:9
    y:-0.1
}

Leave a comment