jcheng5 / bubbles

d3 Bubble Chart for R
MIT License
57 stars 23 forks source link

ENABLE HTML TOOLTIPS WITH LINE BREAKS #10

Open mmgledhill opened 6 years ago

mmgledhill commented 6 years ago

Previous version relied on Circle Title which did not allow for html formatted text. Replaced title CSS tooltip. Users can further control tooltip style with css to their shiny apps. See example below. Note: Tooltip does not render in correct position in Rstudio Viewer but will work when rendered in a shiny app.

Example call to style tooltip within Shiny code: renderUI(tags$head(tags$style(HTML('div.tooltip { outline: none; background: white; text-align: left; display: inline-block; font: 9px; border: 1px; border-radius: 8px; pointer-events: none; position: absolute; width: 170px; min-width: 170px; max-width: 255px; }

div.tooltip .tool-content { margin:0; padding:0; opacity: 0; visibility: hidden; position: absolute; width:100%; height:100%; }'))))