I'm trying to make plot with extra variables in tooltips, but can't understand how to make it.
For example I want to display qsec
, cyl
and hp
columns
Tutorial from API didn't help me
Example :
library(dplyr)
library(echarts4r)
mtcars %>%
tibble::rownames_to_column("model") %>%
e_charts(wt) %>%
e_scatter(mpg,bind=model) %>%
e_tooltip(formatter = htmlwidgets::JS("
function(params){
return('<strong>' + params.name +
'</strong><br />wt: ' + params.value[0] +
'<br />mpg: ' + params.value[1] +
'<br />qsec: ' + this.qsec ) } "))
expected result something like this:
https://github.com/jbkunst/highcharter/issues/54