# NOT RUN {
fn <- "function(){
console.log('Category: ' + this.category);
alert('Category: ' + this.category);
}"
hc <- highcharts_demo() %>%
hc_plotOptions(
series = list(
cursor = "pointer",
point = list(
events = list(
click = JS(fn)
)
)
)
)
# }
# NOT RUN {
export_hc(hc, filename = "~/hc_is.js", as = "is")
export_hc(hc, filename = "~/hc_vr.js", as = "variable", name = "objectname")
export_hc(hc, filename = "~/hc_ct.js", as = "container", name = "#selectorid")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab