bb_tooltip: Tooltip property for a Billboard.js chart

View source: R/bb_utils.R

bb_tooltipR Documentation

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.

...

See https://naver.github.io/billboard.js/release/latest/doc/Options.html#.tooltip

Value

A billboard htmlwidget object.

Examples

# 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;}")
    )
  )

billboarder documentation built on Sept. 29, 2023, 5:07 p.m.