Yoctol / react-d3-cloud

A word cloud react component built with d3-cloud.
https://yoctol.github.io/react-d3-cloud
MIT License
141 stars 47 forks source link

Add color and colors props to give word cloud custom colors #76

Closed caiolopes closed 3 years ago

caiolopes commented 7 years ago

It allows to give a color for all words, or an array of colors. If the array of colors is smaller than the word cloud size, the default color will be given to the rest. If none are given, it will be the default behavior.

stegben commented 7 years ago

Great feature! Would you please update README and add some tests?

stegben commented 7 years ago

If you find it difficult to test the color, try snap-shot in jest. Example