New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip customization #72
Comments
Hi, For your first point, setting the opacity of your added .scatterD3-tooltip {
opacity: 1 !important;
} For your second point, I just added a scatterD3(data = mtcars, x = wt, y = mpg, tooltip_position = "top left") Don't hesitate to let me know if it works for you. |
Thank you so much for the blazing fast answer and for adding the new feature! It works perfectly! (yes, I'm using Actually, I asked for the opacity thing because I thought it would solve my problem, but it didn't. Please run the minimal reproducible example below: library(scatterD3) # install dev version with devtools::install_github("juba/scatterD3")
library(shiny)
my_tooltip = '</p><span style="color: #FF0000 ;background-color: #FF0000 "> ---- </span> </span> <span style="color: #ffffff;"> - </span> <span style="background-color: #9EC0E6 "> duck </span> <span style="background-color: #4788D1 "> raccoon </span> <span style="background-color: #649AD8 "> banana </span>'
ui <- shinyUI(fluidPage(
tags$style(type='text/css',
'.scatterD3-tooltip {opacity: 1 !important;}'
),
fluidRow(column(6,
htmlOutput('my_html')
),
column(6,
scatterD3Output('my_scatter', height='450px')
)
)
))
server <- function(input, output) {
output[['my_scatter']] = renderScatterD3({
scatterD3(x = 1,
y = 1,
tooltip_text = c(my_tooltip),
)
})
output[['my_html']] = renderUI({HTML(my_tooltip)})
}
shinyApp(ui=ui, server=server) You'll see that in the |
The white text you see in the tooltip is because of a Let me know if this still doesn't fix your problem. |
Thanks a bunch, works perfectly! I added: tags$style(type="text/css",
".scatterD3-tooltip {text-shadow: none;}"
), on top of my |
Thanks much for the excellent package! I have two quick tooltip questions:
<div style='width:300px;font-size:115%>
), but settingopacity:1
doesn't have any impact, so I guess it's overwritten at a higher level. Is it possible to change that?Thank you very much in advance for your help!
The text was updated successfully, but these errors were encountered: