Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chart.js V2 line chart missing point

Is there any way to get missing links connected in Chart.js 2.x.x like they linked in last versions of 1.x.

If i had datasets in version 1.x with data [1,2,3,null,5,6] and [1,2,3,4,5,6], chart drew both lines without missing line on null point. On version 2.x linechart won't draw any line on set 1 between points 3 and 5.

I have tried to read chart.js documentation but haven't found any options to this...

like image 863
Quutti Avatar asked Jan 28 '26 22:01

Quutti


1 Answers

There is a new dataset option spanGaps that allows to connect dots with gaps between them.

Github commit for reference:

  • https://github.com/chartjs/Chart.js/commit/77357e57d6f5ae44ba10bf22b06219850df4df5f
like image 153
przemod Avatar answered Jan 31 '26 12:01

przemod