Skip to content

v0.6.0

Latest

Choose a tag to compare

@bhardwajhimanshu2515 bhardwajhimanshu2515 released this 22 Nov 23:28
· 10 commits to master since this release
0111043

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 lodash import (#237, fixes #122)

New props

  • arcLabels and needleTooltip: 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)
  • formatTextValue now also receives the raw value as a second argument (#242, #89)

Docs

  • needleScale is documented as the needle length (#246, #90)

Install

npm install react-gauge-chart@0.6.0