Description Usage Arguments Examples
Gauge tooltip.
1 | gauge_tooltip(g2, callback = NULL)
|
g2 |
An object of class |
callback |
A JavaScript callback function (see |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | callback <- cb(
"function(drat, qsec){
percent = qsec / 100 + '%';
return {
name: drat,
value: percent
};
}"
)
template <- '<li>{name}: {value}</li>'
g2(mtcars, asp(mpg, qsec, tooltip = drat, tooltip = qsec, color = qsec)) %>%
fig_point() %>%
gauge_tooltip(callback) %>%
conf_tooltip(itemTpl = template, showTitle = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.