Learn R Programming

billboarder (version 0.2.4)

bb_tooltip: Tooltip property for a Billboard.js chart

Description

Tooltip property for a Billboard.js chart

Usage

bb_tooltip(bb, ...)

Arguments

bb

A billboard htmlwidget object.

Value

A billboard htmlwidget object.

Examples

Run this code
# NOT RUN {
# Format tooltip
billboarder() %>% 
  bb_scatterplot(data = iris, x = "Sepal.Length", y = "Sepal.Width", group = "Species") %>% 
  bb_tooltip(
    format = list(
      # skip the title in tooltip
      title = htmlwidgets::JS("function() {return undefined;}"),
      name = htmlwidgets::JS("function(name, ratio, id, index) {return '';}"),
      value = htmlwidgets::JS("function(value, ratio, id, index) {return id;}")
    )
  )
# }

Run the code above in your browser using DataLab