How can I skip null values in Line charts?

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Joerg on 17th March 2017
following my problem:
i have a series of values - but possibly not always the same increment.
A Sample: i have values for 10,11,12,15,16,17 o'clock - but noch for 13 and 14o'clock. I filled them with "null" - but the line should be connected from the values at 12o'clock and 15o'clock.
Is there a chance to do that?

With best regards
Posted by Richard on 17th March 2017
Hi there,

Imply pre-fill the data with whatever values you want to see.

var data = [4,7,4,2,null,null,9,7,4,1];

for (var i=0; i<data.length; ++i) {

     // Could also be RGraph.SVG.isNull depending on whether you're using
     // canvas or SVG charts

     if (RGraph.isNull(data[i])) {
         data[i] = 0;


Add a reply

« Back to message list