How to hide the series when clicking a legend in googlevis line chart that is embedded in shiny

162 views
Skip to first unread message

Moran Koren

unread,
Dec 23, 2013, 12:44:08 AM12/23/13
to google-visua...@googlegroups.com

Hi All , I am buliding a system in R , using shiny and google visualization packages.

We have a shiny app with embedded google line charts using the googlevis package. I need to be able to hide a line when clicking on it's legend key. I found this code on how to do it in google charts:

$http://jsfiddle.net/xDUPF/4/light/$

How can I introduce this behavior to a graph created using shiny? can I use the "jscode" parameter for it?


Thanks , 

M.

Moran Koren

unread,
Dec 25, 2013, 1:46:50 AM12/25/13
to google-visua...@googlegroups.com

Asking also on stackoverflow , I got the following answer  that does the trick:

I am sure it will be useful to other members of the group as well!

Thanks!
Reply all
Reply to author
Forward
0 new messages