Closed dougmet closed 7 years ago
I've noticed that when the chart updates multiple iframes are stacking up in the DOM. I wonder if the hover over is activating in iframes that are supposed to have been covered over or removed.
Hi, I'm observing the same issue when using radarchart in a Shiny environment.... and that makes it difficult to use. Is there a possibility to unable "hovering"? Best regards, Jürgen
Coming back to this after a longer than expected break. It's only the feature-v1api branch that's causing problems so hopefully easy to debug. Lots of js errors on the front end too:
chartJSRadar.js:22 Uncaught ReferenceError: Chartjs is not defined
at Object.renderValue (http://127.0.0.1:5795/chartJSRadar-binding-1.0.0.9000/chartJSRadar.js:22:28)
at Object.renderValue (http://127.0.0.1:5795/htmlwidgets-0.8/htmlwidgets.js:819:25)
at exports.OutputBinding.shinyBinding.renderValue (http://127.0.0.1:5795/htmlwidgets-0.8/htmlwidgets.js:516:20)
at exports.OutputBinding.onValueChange (http://127.0.0.1:5795/shared/shiny.min.js:3:24481)
at exports.OutputBinding.delegator.(anonymous function) [as onValueChange] (http://127.0.0.1:5795/htmlwidgets-0.8/htmlwidgets.js:112:23)
at OutputBindingAdapter.onValueChange (http://127.0.0.1:5795/shared/shiny.min.js:4:11014)
at ShinyApp.receiveOutput (http://127.0.0.1:5795/shared/shiny.min.js:3:18086)
at ShinyApp.<anonymous> (http://127.0.0.1:5795/shared/shiny.min.js:3:19802)
at ShinyApp._sendMessagesToHandlers (http://127.0.0.1:5795/shared/shiny.min.js:3:19607)
at ShinyApp.dispatchMessage (http://127.0.0.1:5795/shared/shiny.min.js:3:19397)
renderValue @ chartJSRadar.js:22
renderValue @ htmlwidgets.js:819
shinyBinding.renderValue @ htmlwidgets.js:516
onValueChange @ output_binding.js:16
delegator.(anonymous function) @ htmlwidgets.js:112
onValueChange @ output_binding_adapter.js:21
receiveOutput @ shinyapp.js:257
(anonymous) @ shinyapp.js:424
_sendMessagesToHandlers @ shinyapp.js:409
dispatchMessage @ shinyapp.js:393
c.onmessage @ shinyapp.js:91
OK the js error was easy. Hover over still not good though.
Interestingly the addition of the iframe has been a bit controversial with chart.js users. https://github.com/chartjs/Chart.js/issues/2210 so now that version 2.4 is available I might check that out and see if we can stop the hidden iframe from being added.
Maybe a red herring. WIth responsive=FALSE
you don't get the iframe and it still has the hover over problem.
Turns out this was a bit schoolboy. Need to remove the old data from the chart before updating. So a call to Chartjs.destroy()
removes it.
Dear dougmet,
do you have a small shiny example for me?
Thank you very much Jürgen
There are some shiny examples in the package. You can run them by typing:
library(radarchart)
runExampleApp("basic")
The code for them is in inst/shiny-examples
Sorry for being so late in getting back to you.... I updated the package and now the problem seems to be solved. I will check it in the Shiny app I am realizing and will come back to you....
I just checked it... the hovering effect is fine now. Thank you very much Jürgen
Moved from #32 and @tcash21
@alireza202
@tcash21