toggle data in line chart

1,931 views
Skip to first unread message

klaasvaak

unread,
Jun 22, 2010, 8:34:31 AM6/22/10
to Google Visualization API
I'm using a line chart, like http://code.google.com/apis/ajax/playground/?type=visualization#line_chart.
But I would like to be able to toggle the data. See an example of what
I mean on http://people.iola.dk/olau/flot/examples/turning-series.html.

Is it possible to do this within Google Charts?

Jinji

unread,
Jun 23, 2010, 11:03:47 AM6/23/10
to google-visua...@googlegroups.com
You can add the check boxes yourself, listen to click events, and within those events, modify the DataTable appropriately, and call chart.draw() again, with the new DataTable.

HTH


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
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.


asgallant

unread,
Oct 18, 2012, 12:33:14 PM10/18/12
to google-visua...@googlegroups.com
Would something like this help: http://jsfiddle.net/asgallant/WaUu2/?

On Thursday, October 18, 2012 5:50:26 AM UTC-4, Scott McCulloch wrote:
This is exactly what I'd like to be able to do, but I haven't really got a clue how to go about it... I'm pretty new to the visualization api, and not much of a coder to begin with - I have managed to get my line chart with dynamically loaded data via php/mysql, but I've got too many variables, so it becomes hard to read -- I'd love to be able to toggle each individual data series on and off like in the example in your link.

Scott McCulloch

unread,
Oct 18, 2012, 12:49:12 PM10/18/12
to google-visua...@googlegroups.com
I believe it would! Thank you - I think I can definitely work with this!

Extus Justin

unread,
May 19, 2013, 3:01:43 PM5/19/13
to google-visua...@googlegroups.com

Does anyone know how to do this in "Iwork Numbers?"
Reply all
Reply to author
Forward
0 new messages