Lchiffon / wordcloud2

R interface to wordcloud for data visualization.
396 stars 107 forks source link

rmarkdown html multiple wordclouds #60

Open AlisonCT opened 5 years ago

AlisonCT commented 5 years ago

I am using a wordcloud2 in an rmarkdown html_document. When I include multiple wordclouds the first one works fine but subsequent ones don't display. I can get around this by using saveWidget and webshot to include a png of the wordcloud, but this is not ideal (I like being able to hover over the wordcloud and see the counts). Do you have a solution for this?

Thank you!

jl5000 commented 5 years ago

32

maxpel commented 4 years ago

I encountered a similiar problem: Multiple wordcloud2s still don't render in flexdashboard (except for the first one), when they are placed in tabs via Column {.tabset} like in https://rmarkdown.rstudio.com/flexdashboard/layouts.html#tabset_row

jacciz commented 11 months ago

I found a workaround using htmlwidgets package that allows for multiple wordclouds. I'm using quarto to render multiple and this works.

a = wordcloud2::wordcloud2(coffee)

htmlwidgets::saveWidget(widget = a,
                        file = "a.html",
                        selfcontained = TRUE)