hideDataColumns() does nothing on an Annotated Timeline

94 views
Skip to first unread message

Aengus Walton

unread,
Jan 15, 2013, 7:48:56 PM1/15/13
to google-visua...@googlegroups.com
Hi,

hideDataColumns() doesn't seem to be working for me. I've created my chart, made it global so I can query it from the Chrome console, and yet nothing happens when I call hideDataColumns. The chart has 4 data columns. 

If anyone has any advice, please share! I looked through this forum but couldn't find anything that helped.

My chart object is created:

            chart = new google.visualization.AnnotatedTimeLine(document.getElementById('chart_div'));
            chart.draw(data, {
                displayAnnotations: true,
                zoomStartTime: addMonths(new Date(), -2),
                dateFormat: 'HH:mm MMMM dd, yyyy',
                allowRedraw: true
            });

(the "addMonths()" function being the same as http://stackoverflow.com/a/1648448/221001 )

Here is an example Chrome console session (which results in nothing changing):

chart
sm
chart.hideDataColumns(2)
undefined
chart.hideDataColumns([1, 2])
undefined


asgallant

unread,
Jan 15, 2013, 8:06:12 PM1/15/13
to google-visua...@googlegroups.com
Do you have at least 3 data series?  If so, that should work; I tested on the visualization playground and it worked fine for me.

Aengus Walton

unread,
Jan 16, 2013, 6:44:16 AM1/16/13
to google-visua...@googlegroups.com
Hi,

I just tried it in the Visualisation Playground and it worked -- then tried it in my own application and all of a sudden the same code that didn't work last night worked. 

Sorry for opening this thread. It was late last night (so I'd probably done something rather stupid) and wanted to have a few pointers in the morning. Should've probably just slept on it. 

Thanks anyway!
Aengus


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/ivrtj3_UY5gJ.

To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.



--
http://ventolin.org
Reply all
Reply to author
Forward
0 new messages