Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Linechart Disconnect-threshold

Open stephanarts opened this issue 10 years ago • 3 comments

It would be nice if a linechart has a 'disconnect-threshold', imagine a dataset of a timechart. Containing values every minute (roughly), and suddenly a 'gap' of 10 minutes.

It would be nice if there's a way you can say that those two datapoints should not be connected.

stephanarts avatar Dec 20 '15 20:12 stephanarts

@stephanarts I think I get what you're asking for. If you had the data points at times 1348, 1349, 1350, 1410, 1411, 1412. The first 3 points would be connected together and the last 3 points would be connected. But there would be no line from 1350 to 1410.

You could, for now, fake this easily by simply adding a NaN into the data array between points. The line will skip those points.

etimberg avatar Dec 20 '15 22:12 etimberg

@etimberg That is indeed what I am looking for.

I didn't know about the workaround, that will work, thanks.

stephanarts avatar Dec 21 '15 08:12 stephanarts

Closing since this was resolved

etimberg avatar Feb 27 '16 00:02 etimberg