Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hover does not work with mulitiple wordclouds. #18

Open
jahagirdar opened this issue Jan 18, 2017 · 13 comments
Open

Hover does not work with mulitiple wordclouds. #18

jahagirdar opened this issue Jan 18, 2017 · 13 comments

Comments

@jahagirdar
Copy link

Example http://data.dyumnin.com/analysis/tweeplytics/ashutosh83B.html
This page has 4 wordclouds, If we mouse over the words on any of the wordclouds the rectangular frame and word count appears over the first cloud instead of the cloud over which the mouse is positioned.

@AdeelK93
Copy link
Contributor

Would you happen to have the code used to make this? I see what you're describing in the link, but I'm unable to reproduce it with multiple wordclouds on my own

@jahagirdar
Copy link
Author

@AdeelK93
Copy link
Contributor

AdeelK93 commented Apr 7, 2017

Do you have the other associated files with this Rmd? Some of the required csv's don't seem to be included. Or better yet, would you happen to have a more minimal example?

@AdamSpannbauer
Copy link
Contributor

AdamSpannbauer commented Dec 6, 2017

Below is a minimal example of the hover bug. The 2 wordclouds in the fluidRow exhibit the bug (ie the hover info works fine for "my_wc" but the hover info for "my_wc2" is displayed on top of "my_wc"). The 2 wordclouds placed directly into fluidPage have no issues with the hover information.

library(shiny)
library(wordcloud2)
shinyApp(
  ui=shinyUI(fluidPage(
    fluidRow(
      column(width=6,align="center", wordcloud2Output("my_wc")),
      column(width=6,align="center", wordcloud2Output("my_wc2"))
    ),
    wordcloud2Output("my_wc3"),
    wordcloud2Output("my_wc4")
  )),
  server=shinyServer(function(input,output,session){
    output$my_wc  = renderWordcloud2(wordcloud2(demoFreq))
    output$my_wc2 = renderWordcloud2(wordcloud2(demoFreq))
    output$my_wc3 = renderWordcloud2(wordcloud2(demoFreq))
    output$my_wc4 = renderWordcloud2(wordcloud2(demoFreq))
  })
)

AdeelK93 added a commit to AdeelK93/wordcloud2 that referenced this issue Dec 7, 2017
@AdeelK93
Copy link
Contributor

AdeelK93 commented Dec 7, 2017

ezpz #32

That look alright to you @AdamSpannbauer?

@AdamSpannbauer
Copy link
Contributor

That seems to be fix the issue on my end. Thanks @AdeelK93

Tested on linux box w/R 3.4.1 & windows box w/R 3.4.2 using Chrome for browser.

@duocang
Copy link

duocang commented Jan 9, 2018

I am still confused about this issue, especially in a shiny module.
I create a shiny module to implement wordcloud2, and I call this module itself inside the module to create a modal(pop up window). The hover text does not work(just like http://data.dyumnin.com/analysis/tweeplytics/ashutosh83B.html)

I only give the abstract of my code, since it has 800 lines for one module. You donot want to read it.
namesapce might be the problem for this issue.

I only can use CARN version. So, I do not if #32can solve this problem or not.

##################################################################
\# UI
##################################################################
keywordWordcloudInput <- function( id, title = "Keywords"){
   ......
   ......
}

########################################################################
\# Server
#######################################################################
keywordWordcloud <- function( input,  output, session,data.keywords){
    ....
    ....
    #
    # Full screen modal
    # 
    modalUI <- function(){
      # Use namespace provided by session
      ns <- session$ns
    
      # UI content
      modalDialog({ 
            .......
            # Body
            fluidRow(
                 keywordWordcloudInput(
                 id = ns("keywordWordclouf_fullscreen")
            )#fluidRow
       })#modalDialog
     }#modalUI

     callModule(
        keywordWordcloud,
        id = "keywordWordclouf_fullscreen",
        reactive(data.keywords()),
        fullscreen_link = FALSE
      )#callModule

}

@AdamSpannbauer
Copy link
Contributor

Do you still have the issue if you install #32 ?

@duocang
Copy link

duocang commented Jan 9, 2018 via email

@AdamSpannbauer
Copy link
Contributor

If it does fix your issue I hope that it can serve as more motivation for @Lchiffon to merge the PR. I'm also prevented from using wordcloud2 until a fix for the issue is on CRAN.

@duocang
Copy link

duocang commented Jan 9, 2018 via email

@AdamSpannbauer
Copy link
Contributor

The updated version on CRAN might fix your issue.

For the issue of hover with multiple wordclouds it made the issue worse. The minimal example posted earlier in this thread only plots 1 of the 4 wordclouds with the version 0.2.1 on CRAN.

@AdeelK93
Copy link
Contributor

@wangxuesong29 Try using this version of wordcloud2: https://github.com/AdeelK93/wordcloud2

The CRAN version does not include #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants