score:1

have you tried area charts with fill set to false? check out the samples here https://www.chartjs.org/samples/latest/charts/area/line-boundaries.html

it's kind of a hack but you can append the data with an extra point and update its styles to keep it hidden, refer to our fiddle https://jsfiddle.net/hpdr5jf1/

relative code

var options = {
  type: 'line',
  data: {
    labels: ["", "actual data"],
    datasets: [
        {
          label: 'data point',
          data: [12, 12],
        pointradius: [0],
        pointhitradius: [0],
        borderwidth: 1,
        fill: false,
        bordercolor: 'red'
        }
        ]
  },
  options: {
    scales: {
        yaxes: [{
        ticks: {
                    reverse: false
        }
      }]
    }
  }
}

var ctx = document.getelementbyid('chartjscontainer').getcontext('2d');
var mychart = new chart(ctx, options);

Related Query

More Query from same tag