Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Custom Formatting of Tooltip Display #451

Open
duffy88 opened this issue Feb 3, 2016 · 0 comments
Open

Custom Formatting of Tooltip Display #451

duffy88 opened this issue Feb 3, 2016 · 0 comments

Comments

@duffy88
Copy link

duffy88 commented Feb 3, 2016

I'm relatively new to both ggvis and using custom HTML with my shiny apps so perhaps this is a rudimentary question.

I'm trying to show some simple HTML text on hover, however I want to remove the box and shadow effects, so there is just text overlaid on the graph. However, passing style arguments in my HTML text function does not modify the box itself, but only the div tag within the box. I imagine this is because the tooltip function is creating a parent div. Executing the code below, does not remove the box/shadow, and only colors the immediate background of my text, leaving a white perimeter and the aforementioned box and shadow.

htmltext <- function(x){
        if(is.null(x)) return(NULL)
        paste("<div style = 'background-color:red;border:none;box-shadow:none'><h4>",
              x$place)
      }

... and subsequently:
... %>% add_tooltip(htmltext, "hover")

Any help modifying the default styling of the tooltip box would be much appreciated! My googling has left me empty-handed!

Also posted to ggvis google group: https://groups.google.com/forum/#!topic/ggvis/2yM4tA6zTJw

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant