I use Flot to plot the chart, and the null elements at the end of the data collection are ignored.
My code is below:
var d1 = []; for (var i = 0; i <= 3; i += 1) d1.push([i, parseInt(Math.random() * 30)]); for (var i = 4; i <= 10; i += 1) d1.push([i, null]); function plotWithOptions() { $.plot($("#placeholder"), [d1], { series: { bars: { show: true } } }); } plotWithOptions();</code>
Using Flot 0.8.1, this gives the following:

JSFiddle 0.8.1
Interestingly, using an older version of Flot (0.7), this creates the type of chart that I would expect, with the null elements displayed as spaces:

JSFiddle 0.7
In 0.8.1, if I add a non-zero element at the end, null entries are displayed as a space, but this is different from 0.7 where they are displayed independently (and what behavior I am trying to achieve).
Is there a setting or something I need to change to achieve this?
source share