How can I transfer data from a Sunburst plot to R on the server side? The code provided below generates a sunburst plot and displays an alert when a specific level is selected. I want to be able to pass this information so that I can create a download list.
library(sunburstR)
# read in sample visit-sequences.csv data provided in source
# https://gist.github.com/kerryrodden/7090426#file-visit-sequences-csv
sequences <- read.csv(
system.file("examples/visit-sequences.csv",package="sunburstR")
,header = FALSE
,stringsAsFactors = FALSE
)
sb <- sunburst(sequences)
sb$x$tasks <- list(
htmlwidgets::JS(
"
function(){
//debugger;
this.instance.chart.on('click',function(d){
alert(d);
});
}
"
)
)
sb