Chartjs-How to fill a graph by a color till a vertical line using chart.js

1👍

You can split the dataset into 2 and just set the fill property for the section with area to true, and the one without area to false. Your new dataset would appear as follows:

datasets: [{
      label: "My First dataset",
      data: [65, 0, 80],
      fill: true
    }, {
      label: "My First dataset",
      data: [null, null, 80, 81, 56, 85, 40],
      fill: false
    }
]

Leave a comment