Toggle Column Display

31 views
Skip to first unread message

Gerson Goulart

unread,
Nov 3, 2011, 4:52:15 PM11/3/11
to Google Visualization API
Hi!

I'm trying to do something really simple you can see in this page:

http://www.highcharts.com/demo/column-basic

Clicking on one of the label will "disable" it, removing it's bar from
the graph but keeping the (greyed out) label available so you can
click it again to "enable" it again.

I could manage to hide the column but it also hide the label so I
can't get it back.

Is it posible to do at all?

Thanks!

Roni Biran

unread,
Nov 4, 2011, 5:28:57 AM11/4/11
to google-visua...@googlegroups.com
This feature does not exist, however you can create a function that will change the columns displayed in the charts.


--
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,
Nov 4, 2011, 10:00:28 AM11/4/11
to google-visua...@googlegroups.com
I can think of some hackery that might do this for you.  Create one additional column for each data column (give them the same name and the same color), and set all the data points for the duplicate columns to null.  Hide the original columns from the legend, and then listen for clicks on the legend, toggling the data columns when the duplicate's legend entry is clicked.  Like this: http://jsfiddle.net/MuC37/

Gerson Goulart

unread,
Nov 4, 2011, 12:42:57 PM11/4/11
to Google Visualization API
Yes Sir!

You rocked asgallant: That's exactly what I was trying to accomplish.

Brilliant idea. Thank you for your input.

Cheers!

Gerson Goulart

unread,
Nov 4, 2011, 12:46:36 PM11/4/11
to Google Visualization API
Just too bad the API doesn't provide a clean way to do this. :(

On Nov 4, 7:00 am, asgallant <drew_gall...@abtassoc.com> wrote:
Reply all
Reply to author
Forward
0 new messages