annotations with style: 'line' & interpolateNulls with area chart type data

331 views
Skip to first unread message

Dominic

unread,
Dec 14, 2011, 4:14:08 AM12/14/11
to Google Visualization API
Hi all,

I would like to upgrade a combo chart with annotations associated to
the h-axis (datetime). The annotations would contain milestone
information like "product A launched" which is not necessarily related
to data points in the chart. The data looks like this:
data.addColumn('datetime', 'time');
data.addColumn({type:'string', role:'annotation'});
data.addColumn({type:'string', role:'annotationText'});
data.addColumn('number', 'Revenue');// type: area
data.addColumn('number', 'Cost');// type: area
data.addColumn('number', 'Margin');// type: line


I am stuck with two limitations though:
- annotations should be also possible for y values without x values
associated, resulting in NULL x values; I am therefore using the
'interpolateNulls: true' option. Issue: this only works for series
type: "line", it does not works for type: "area" which is what I am
using. The effect in my chart is that type line data is displayed and
type area data is not displayed for 'NULL' data points...
- annotations should be displayed as {style: 'line'}. They do not get
displayed that way in my tests and the documentation says this is not
available for data values (which does not make any sense to me...)

Any hints would be appreciated.

Thanks,
Dominic

asgallant

unread,
Dec 14, 2011, 9:54:22 AM12/14/11
to google-visua...@googlegroups.com
The 'interpolateNulls' option only works with Lines, so the behavior you are seeing with Areas is correct.  There is no way around this, except to do your own interpolation.

The 'line' style annotations only work for axis annotations, like this: http://jsfiddle.net/NC37X/

Dominic

unread,
Dec 14, 2011, 12:22:09 PM12/14/11
to Google Visualization API
Thanks, I have added the option interpolateNulls for combo and area
charts as a feature request (757).
Reply all
Reply to author
Forward
0 new messages