Not drawing null values using chart.js

前端 未结 5 1598
别那么骄傲
别那么骄傲 2021-02-05 12:00

I\'m using Chart.js to draw a chart.. My dataset have some null values, Actually chart.js plot a line between points that are previous and successor of the null values in this w

5条回答
  •  不思量自难忘°
    2021-02-05 12:47

    I know this is pretty old, but I think there is a better solution now. Replace all your null values with Number.NaN

    http://www.chartjs.org/docs/#line-chart-chart-options

    Below is a data point I replaced with NaN on the red line

提交回复
热议问题