[Chartjs]-Chart.js drawing line between two points

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 or null data. If false, points with NaN data will create a break in the line.

...
{
    label: 'Pattern',
    data: numbers1,
    fill: false,
    borderWidth: 2,
    borderColor: 'red',
    spanGaps: true
}
...

Leave a comment