Closed mishaborys closed 6 years ago
you are very close. You just need to wrap your js function in JS. Have a look at Issue #4 had where another user had the same same problem.
c3(data, onclick = htmlwidgets::JS('function(d, element){console.log(d.id)}'))
commit e2bea1c20b56ac7affad10a42fe52d3fe8615dd6 added an example to the readme page and to the c3()
functions documentation
Thanks a lot for fast feedback. It really help me.
I want to add onclick event to chart in Shiny App. I`v read this article with c3 examples and try to do some simple app with print in console when clicked on chart. But in my case, onclick I have this error in console. Could you, please, say what I do wrong?