ggvis icon indicating copy to clipboard operation
ggvis copied to clipboard

Non-reactive version of add_tooltip() to remove the restrictive shiny dependency

Open dhimmel opened this issue 10 years ago • 2 comments

Currently, add_tooltip(vis, html, on) requires a function for the html argument that returns the html to render in the tooltip. Since, the tooltip relies on a function, reactivity is required and ggvis switches interactive mode which requires shiny. Unfortunately, shiny visualizations have much greater overhead and demand expensive software or services to share at scale.

I propose a version of add_tooltip() where html accepts a column from the input data.frame (vis). The user would precompute the tooltip html and store it as a character column in the data.frame. _ggvis_ualizations based on non-reactive tooltips should be exportable to html documents and therefore easily distributed, embedded, and freed from the shackles of shiny.

In many cases, individual observation identification is the single most important reason for interactivity.

dhimmel avatar Jan 10 '15 14:01 dhimmel

Yes, this is definitely on our long-term to do list, although currently I see it as more of a performance optimisation as something that's crucial for ggvis. There are two free ways to host ggvis apps that need interactivity: open source shiny server and shinyapps.io.

hadley avatar Jan 12 '15 13:01 hadley

+1 and could this be made more clear in the documentation until it is? Just wasted two hours getting a graph to play right in rmarkdown with tooltips, groups and smooths, then found out the tooltips required shiny. shiny is great, but I don't know a way to use it that lends itself well to programmatically creating apps with different data (e.g. I wanted to use ggvis for participant feedback).

rubenarslan avatar Jul 08 '16 12:07 rubenarslan