Please document the `scale` and `spiral` options
dandv opened this issue · comments
At https://react-wordcloud.netlify.com/props#options:
scale - "Control how words are spaced and laid out." - how exactly?
Same for spiral
- how should one think of archimedean
vs. rectangular
?
I'm trying to produce a 90-degree layout like this, but can't tell how to configure those options.
A compact all-horizontal one would be fine too:
Words are very spaced out though.
Thanks for the feedback!
To be honest with you, I'm not sure how to describe archimedean
and rectangular
(source reference: https://www.jasondavies.com/wordcloud/). I think it's a mathematical pattern of laying out the spiral and is somewhat visually noticeable. When first working on this project, I was implementing features based on Jason Davies' wordcloud generator and kept this feature. If there's a formal definition for this prop
, I would totally be happy to update the Props
page lol.
But to get to the two layouts you need, you should use rotationAngles
and rotations
- https://codesandbox.io/s/react-wordcloud-options-kuswu?file=/src/index.js
- https://codesandbox.io/s/react-wordcloud-options-5qnqs?file=/src/index.js
It's covered super sparsely in https://react-wordcloud.netlify.app/usage/options#rotations, and I'll update the docs to include examples of these common layouts. The way to think about it is: The number of rotations I can use between specified min/max rotation angles.