Releases: chrisrzhou/react-wordcloud
v1.0.4
Improve React hooks
Improve and simplify React hooks code after detailed understanding of: https://overreacted.io/a-complete-guide-to-useeffect/
Also updated the PropsTable
docs with prop descriptions.
Bug fixes:
- Handle words that don't fit in the boundary of the SVG by applying a font-size scale factor
- Handle large number of words
- Fix up some types
v1.0.3
Bug Fixes
Fixing the following bugs:
Tooltip bug is fixed by programmatically creating and destroying the tippy
instance. Word implosion and missing words are related to jasondavies/d3-cloud#36, and is fixed with a recursive solution.
v1.0.2
v1.0.1
Update word.count
to word.value
v1.0.0
Modern rewrite
Features
As part of learning and ramping up with better JS tools and frameworks, v1.0.0 is a modern rewrite that focuses on:
- Simplifying and decoupling React/D3 code with React hooks.
- Document examples with
docz
. - Typescript support.
- Minimize build size with
rollup
andbundlesize
.
Breaking Changes
Compared to v0, there are a number of breaking changes.
- React Dependency: You need at least
react^16.8.3
installed to access hook functionality. - Features: Most features of the component still remain the same (e.g. tooltips, min/max font size, responsive).
- Props: Many v0 props have been merged into
options
andcallbacks
with potentially different names. Please refer to the documentation orindex.tsx
to see how to apply props correctly. - Development: Previous developments were done in
flow
and a lot of dev dependencies have changed. The scripts inpackage.json
should help handle most of these changes.
v0.1.1
This React wordcloud component is based on the d3-cloud
wordcloud layout written by Jason Davies.
It includes the following features that can be easily controlled with props.
- Control orientations of words by setting min/max angles.
- Inherits parent node's height/width or accepts explicit values.
- Customize colors by passing an array of colors or callback.
- Customize font family.
- Customize layout/placement of words.
- Customize tooltips using callback.
- Customize click actions on words using callback.
- Set limit of maximum words displayed.