score:2

Accepted answer

if you pass in dat as data in your hc_add_series function, you can access other columns in the tooltip argument, like type:

library(highcharter)

dat = data.frame(first = rnorm(10), second = rnorm(10), type = rep(c("aapl", "msft"),5))

highchart()%>%
  #hc_xaxis(categories = dat$open_date)%>%
  hc_add_series(name = "first", data = dat, hcaes(y = first), type = "column", 
                tooltip = list(pointformat = "{point.type}: {point.first}"))%>%
  hc_add_series(name = "second", data = dat, hcaes(y = second), type = "line",
                tooltip = list(pointformat = "{point.type}: {point.second}"))

highcharter with custom tooltip


Related Query

More Query from same tag