chrisrzhou / react-wordcloud

☁️ Simple React + D3 wordcloud component with powerful features.

Home Page:https://react-wordcloud.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Seeded Randomisation

Abhinav85 opened this issue · comments

Hi Chris

It's an awesome library, and as always you've been a wonderful developer. I was wondering, would it be possible to have seeded randomisation.

My use case is that I have multiple word clouds in different tabs, and as each tab reloads, the rendering of the word cloud has changed from what it was before on the tab because of seeded randomisations. Please correct me if I'm wrong here.

Let me give you an example
This is the first render of the WordCloud
Screenshot 2019-11-28 at 2 08 40 PM

And this is the second re-render
Screenshot 2019-11-28 at 2 08 47 PM

As you can see, they're very different in their positioning. So I was wondering, if there's a way to introduce seeded randomisation so that I always see the same positioning no matter what the case.

Thanks

EDIT - I was using deterministic in a wrong way. This issue has been solved