Search code examples
flot

Flot break line chart - why?


For the following data, I receive dis-continuous line chart.

There are lines for 07:10..07:50, 08:10..08:50, 09:10..09:50,

but Flot ignores the values at 08:00, 09:00 (why?)
and does not connect lines from 07:50 to 08:10 (why?)

In what cases Flot decide to "break" line charts?

07:20   10/03/2016  25.4    24.2    24.7
07:30   10/03/2016  25.2    23.9    24.3
07:40   10/03/2016  25.1    23.8    24.3
07:50   10/03/2016  25.1    23.8    24.3
08:00   10/03/2016  25.1    23.8    24.3
08:10   10/03/2016  25.1    23.9    24.3
08:20   10/03/2016  24.9    24.2    24.3
08:30   10/03/2016  24.9    24.2    24.3
08:40   10/03/2016  24.9    24.2    24.3
08:50   10/03/2016  25      24.5    24.6
09:00   10/03/2016  25.1    24.6    24.7
09:10   10/03/2016  25.2    24.6    24.8
09:20   10/03/2016  25.2    24.6    24.8
09:30   10/03/2016  25.2    24.6    24.7
09:40   10/03/2016  25.2    24.6    24.7

enter image description here


Solution

  • found it - it happens when hours\minutes in CSV are "0" and my code was expecting "00",

    -> no UTC generated,

    -> null value,

    -> chart-line break.

    I saw it only when I opened the csv in text editor.

    When opened in Excel, Excel seems to set the values into correct format!

    v  7:50, 10/3/2016,25.1,23.8,24.3,52.9,0.0,24.0
    x  8:0,  10/3/2016,25.1,23.8,24.3,54.2,0.0,24.0   <- the chart breaks.
    v  8:10, 10/3/2016,25.1,23.9,24.3,52.8,0.0,24.1
    v  8:50, 10/3/2016,25.0,24.5,24.6,49.6,0.0,24.5
    x  9:0,  10/3/2016,25.1,24.6,24.7,48.3,0.0,24.6   <- the chart breaks.
    v  9:10, 10/3/2016,25.2,24.6,24.8,47.6,0.0,24.7
    v  9:20, 10/3/2016,25.2,24.6,24.8,47.1,0.0,24.7