d3-cloud
d3-cloud copied to clipboard
Dynamic word cloud?
Is there a way to continuously increase word frequency (or continuously increase font size) to create a dynamic cloud. For example, show the results of an active vote. As people continue to vote for a particular word, it would dynamically grow. The objective is to avoid a screen refresh or repaint of the cloud.
If the word sizes change, you can always recompute the cloud layout, but be aware that this will likely change the position of the words.
@shotgunwilly I'm trying to do something similar with a continuously updating word cloud. I've found that the best approach is to do a batch updated on a timed interval, recompute the layout like @jasondavies recommends, then animate the change in size, position, rotation etc from old layout to new layout. The time interval update combined with the animation provides an easy way to see the change in which words carry the most weight.
@kagant15 do you by chance have some example code on how to do that, I'm trying to do the same for a project of mine.
@select Sure, however fair warning its been a while since I've worked on this code, not sure if this is still the convention used with d3-cloud example
@kagant15 awesome! You are my hero of the day.