Description Usage Arguments Examples
Add post-render JavaScript tasks to taucharts
1 |
tau |
taucharts object |
task |
either a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | if (interactive()) {
tauchart(mtcars) %>%
tau_point("mpg", "wt") %>%
tau_tasks("function(){alert('I drew a chart')}") %>%
tau_tasks(htmlwidgets::JS(
"function(){alert('Yep, I really did.')}"
)) %>%
tau_tasks(
"
function(){
d3.select(this.el).selectAll('.tau-chart__dot')
.transition().style('opacity',0.1)
.transition().style('opacity',0.9)
.transition().style('opacity',0.1)
.transition().style('opacity',0.9);
}
"
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.