Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a break in graph in flot

My data for the graph drawn in flot can be discontinuous - some measurements can be missing.

I am not allowed to interpolate over them - there must be a discontinuity, no value, no link between values neighboring the missing one; the graph must end on the last measurement before the break, and then restart from first measurement after the break.

I can fully manipulate the data and I know which data is missing and which data appears on the edges. The data comes as multiple series of pairs [time, value], any series can contain breaks (and usually the breaks will be over the same periods of time, for broken communication.)

How can I force flot to create such a gap in a graph?

like image 951
SF. Avatar asked May 10 '13 14:05

SF.


1 Answers

Use a JavaScript null, like this: [[0, 0], [1, 1], null, [3, 3], ...]

like image 170
DNS Avatar answered Oct 20 '22 17:10

DNS