Repository navigation
·
10 commits
to master
since this release
All changes are backward compatible. New props are opt-in and default to the previous behaviour.
Fixes
- The chart no longer re-initialises, and the needle no longer restarts from 0, when the parent re-renders (#240, fixes #81)
- The chart keeps a consistent size when the window or its container resizes, and now follows its container's width, e.g. in a sidebar, tab or grid (#247, fixes #27)
- No crash when rendered without a DOM container, e.g. with react-test-renderer (#241, fixes #85)
- The needle stays at its start value until the animation starts (#245, fixes #112)
- Removed the undeclared
lodashimport (#237, fixes #122)
New props
arcLabelsandneedleTooltip: tooltips on the arcs and the needle (#238, #130)referenceLines: mark a target or baseline on the arc (#239, #170)clampNeedle: keep the needle at the ends for values outside 0–1 (#243, #41)showArcLabels: write the arc labels on the arcs (#244, #43)formatTextValuenow also receives the raw value as a second argument (#242, #89)
Docs
Install
npm install react-gauge-chart@0.6.0