d3-cloud icon indicating copy to clipboard operation
d3-cloud copied to clipboard

Dynamic word cloud?

Open shotgunwilly opened this issue 11 years ago • 5 comments

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.

shotgunwilly avatar Feb 04 '14 23:02 shotgunwilly

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.

jasondavies avatar Feb 04 '14 23:02 jasondavies

@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 avatar Mar 27 '15 14:03 kagant15

@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 avatar Jan 09 '19 16:01 select

@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 avatar Jan 10 '19 02:01 kagant15

@kagant15 awesome! You are my hero of the day.

select avatar Jan 15 '19 10:01 select