Line chart to skip past a null or 0 value?

3,157 views
Skip to first unread message

rachael Hand

unread,
Jul 4, 2013, 8:01:23 AM7/4/13
to google-visua...@googlegroups.com
Hi,

I think i'm being a pleb...

Is it possible to have a chart that draws a nice line between two points, when a value doesn't exist?

I want to have a combo chart that has some bars and some lines on it.

My data will look a little like this:
// adapted from the google playground area:

var data google.visualization.arrayToDataTable([
    ['Month''Bolivia''Ecuador''Madagascar''Papua New Guinea'],
    ['2004/05',  165,      938,         522,             998],
    ['2005/06',  135,      null,        599,             1268],
    ['2006/07',  157,      1167,        null,             807],
    ['2007/08',  139,      1110,        null,             968],
    ['2008/09',  136,      691,         629,             1026]
  ]);


Notice the blank values... 
They're not 0. They're NULL... but... When I put NULL, they're being bypassed, so my chart looks rubbish.
For example, the first value for Ecuador isn't showing properly, because it's not drawing the line between row 1 and row 3...

I really hope someone can help. There must be a way around this...

Thanks in advance,
Rachael

asgallant

unread,
Jul 4, 2013, 1:08:58 PM7/4/13
to google-visua...@googlegroups.com
Set the "interpolateNulls" option to true.

Hai Chau

unread,
Oct 22, 2014, 11:27:08 PM10/22/14
to google-visua...@googlegroups.com
Thanks a lot
Reply all
Reply to author
Forward
0 new messages