Description Usage Arguments Value See Also Examples
Modify plot elements that relate to tooltips. C3.js documentation contains an extended example.
1 2 3 4 5 6 |
c3 |
c3 htmlwidget object |
show |
boolean show or hide tooltips |
grouped |
boolean |
format |
list with options:
|
position |
character js function, wrap character or character vector in JS() |
contents |
character js function, wrap character or character vector in JS() |
... |
addition options passed to the tooltip object |
c3
Other c3: RColorBrewer
, c3
,
grid
, legend
,
region
, subchart
,
xAxis
, zoom
1 2 3 4 5 6 7 8 9 10 11 | data <- data.frame(a = abs(rnorm(20) *10),
b = abs(rnorm(20) *10),
c = abs(rnorm(20) *10),
d = abs(rnorm(20) *10))
data %>%
c3() %>%
tooltip(format = list(title = htmlwidgets::JS("function (x) { return 'Data ' + x; }"),
name = htmlwidgets::JS('function (name, ratio, id, index)',
' { return name; }'),
value = htmlwidgets::JS('function (value, ratio, id, index)',
' { return ratio; }')))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.