Learn R Programming

highcharter (version 0.4.0)

hc_tooltip: Adding tooltip options to highchart objects

Description

Options for the tooltip that appears when the user hovers over a series or point.

Usage

hc_tooltip(hc, ...)

Arguments

hc
A highchart htmlwidget object.

Examples

Run this code


data(citytemp)

highchart() %>% 
  hc_xAxis(categories = citytemp$month) %>% 
  hc_add_series(name = "Tokyo", data = citytemp$tokyo) %>% 
  hc_add_series(name = "London", data = citytemp$london) %>% 
  hc_tooltip(crosshairs = TRUE, backgroundColor = "gray",
             headerFormat = "This is a custom header<br>",
             shared = TRUE, borderWidth = 5)
             

Run the code above in your browser using DataLab