fix(word-cloud): fix randomness of each word's rotation #19977
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
In
random
andsquare
mode, the words rotation of a word cloud chart should be assigned randomly, and be different for each word. Before this PR, all words use the same rotation (derived from the first randomly generated number by seedRandom()).This PR fixes that behaviour, and restores the randomness of each word's rotation.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
--
After:
TESTING INSTRUCTIONS
Create a word cloud chart, and select a square or random rotation. Ensure all words have different rotations.
ADDITIONAL INFORMATION