Skip to content
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

different results for the same wordlist #49

Open
willjohnson3 opened this issue Jan 23, 2014 · 2 comments
Open

different results for the same wordlist #49

willjohnson3 opened this issue Jan 23, 2014 · 2 comments

Comments

@willjohnson3
Copy link

I'm running into an issue where rendering the same wordlist is producing different clouds. Essentially hitting f5 in my browser will occasionally render different clouds including size+position+inclusion of terms in the cloud. from looking at the code this seems to be caused by the use of Math.random without a seed (i know math.random does not offer this option but there are lots of good alternatives)

my problem is that i'm using the cloud in an analytic application and the seeming 'randomness' of what gets displayed in the tagcloud is making users nervous about the backend.

@willjohnson3
Copy link
Author

fwiw: using the following library gave me nice repeatable results without having to modify jqcloud.

http://davidbau.com/archives/2010/01/30/random_seeds_coded_hints_and_quintillions.html

@akastrin
Copy link

akastrin commented Nov 3, 2016

@willjohnson3: I suppose you use Math.seedrandom() function. Where did you put it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants