3👍
✅
Chart.js does not draw a line between non-adjacent points, by default. This can be enabled, per dataset, with the spanGaps
property:
If
true
, lines will be drawn between points with no ornull
data. Iffalse
, points withNaN
data will create a break in the line.
...
{
label: 'Pattern',
data: numbers1,
fill: false,
borderWidth: 2,
borderColor: 'red',
spanGaps: true
}
...
Source:stackexchange.com