Convenience function to create tooltip templates (itemTp argument in tooltip() function).

tpl(...)

tpl_item(name, value, marker = TRUE)

Arguments

...

One or more tpl_item().

name, value

Name and value of the tooltip item.

marker

Whether to include the color marker (dot) in the tooltip.

Details

The arguments title, name, and value accept either a bare column name from the data to use as {mustache}/{handlebar} in the template. If a string is passed then it is treated as constant.

Examples

template <- tpl(
  tpl_item(
    island,
    bill_depth_mm
  )
)