null makes it crash in rollingAverage() on y = data[1]; since data is then null..
I didn't look much further into it, but when I want a gap in the graph I also add an empty array into the data and this always works perfectly