Issues with Hover and Click · Issue #45 · Lchiffon/wordcloud2 (original) (raw)
The most recent merged PR from @JacobXPX seems to have issues with hover info and issues with click events when rendering multiple wordcloud2s. I have not yet had time to look into what causes the issue, but I know the issues weren't present in my initial PR (based on the example apps shown below).
Please let me know if these issues are not reproducible or if they are due to user error. If these are consistent issues then I think they should be resolved before the next push to CRAN.
All example output below are from running the github version of wordcloud2 in Chrome.
Issues with multiple wordcloud2s:
- No hover info displayed
- Clicking a word in either wordcloud2 updates both input clicked words
devtools::install_github('Lchiffon/wordcloud2')
library(shiny) library(wordcloud2) shinyApp( ui=shinyUI(fluidPage( #using default clicked word input id wordcloud2Output("my_wc"), #using custom clicked word input id wordcloud2Output("my_wc2", clickedWordInputId = "wc2_clicked_word"),
verbatimTextOutput("print"),
verbatimTextOutput("print2")
)), server=shinyServer(function(input,output,session){ output$my_wc = renderWordcloud2(wordcloud2(demoFreq)) output$my_wc2 = renderWordcloud2(wordcloud2(demoFreq))
#using default clicked word input id
output$print = renderPrint(input$selected_word)
#using custom clicked word input id
output$print2 = renderPrint(input$wc2_clicked_word)
}) )
Issues with single wordcloud2
- Hover info is displayed incorrectly at bottom left corner of the wordcloud2 html widget
devtools::install_github('Lchiffon/wordcloud2')
library(shiny) library(wordcloud2) shinyApp( ui=shinyUI(fluidPage( #using default clicked word input id wordcloud2Output("my_wc"),
verbatimTextOutput("print")
)), server=shinyServer(function(input,output,session){ output$my_wc = renderWordcloud2(wordcloud2(demoFreq))
#using default clicked word input id
output$print = renderPrint(input$selected_word)
}) )