-
Notifications
You must be signed in to change notification settings - Fork 107
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
Custom Hover Text #63
Comments
I'd really liked that too. Especially since I often need to use a log scale for the words, but still want to see the real number. And please, don't say "you should use another display in this case", wordcloud still can be the best display sometimes, I use it in shiny for specific UX cases. I've managed to do it by reworking the code a little, but it's not clean. To explain it simply: you modify the R function wordcloud2 to take a third column, that you name for exemple "label". That will make something like that (here I renamed it wordcloud3 because I didn't want to reinstall the package):
Then you modify 2 js files in your package (get to the installation path of your package, you can modify the files directly here without needing to reinstall) :
That should work by using wordcloud3 as you use wordcloud2, but be sure to have you columns |
Is it possible to customize the hover text?
I have a dataset with 3-4 very large words compared to all the others, to solve this I want to take the log of the frequencies (technically I'm taking the ceiling of the log base 2 and then adding 1). I'd either like to customize what frequency is shown in the hover text (or just not show it at all. Is that possible?
The text was updated successfully, but these errors were encountered: