- Add
types
export to package.json (#182)
React 18
compatiblev2.0
version generally available
segmentValueFormatter
function prop for customizing segment values.
svgAriaLabel
prop for accessibility. More details - #135
PropTypes
moved todependencies
frompeerDependencies
. ref: https://github.com/facebook/prop-types#how-to-depend-on-this-package. sandbox: https://codesandbox.io/s/kind-breeze-esuge?file=/src/App.js
React v17
andv6 d3
support. No Breaking Changes.
Typescript
types forvalueTextFontWeight
config/prop
valueTextFontWeight
config/prop to control font weight of current value. ref: https://codesandbox.io/s/eloquent-morning-mnysk?file=/src/App.js- dev changes: prettier changes:
singleQuote: true
,arrowParens: avoid
.prettier
upgraded tov2
- dev changes:
jest v26
- First
1.0
Release candidate withReact 17
support
- ignore
coverage
folder from npm bundle
CustomSegmentLabelPosition
,Transition
types for both Typescript and JS. Resolves #81100%
Test coveragecodecov
,github actions
integration
- removed
@babel/runtime-corejs2
as dependency. ref: #76
- migrated to
lodash-es
fromlodash
for better tree shaking. Exportingtypes
andthemes
from core for better reusablility. - removed
lodash
dependency. ref: https://codesandbox.io/s/zen-darkness-c3ev3, https://codesandbox.io/s/gracious-swanson-1rts8
npmignore
to reduce npm tarball/package size. Linking to github image asset for README
customSegmentLabels
prop to display custom labels. Live Example- bugfix. Fixed #68
Typescript
support with typescript definition file
paddingHorizontal
,paddingVertical
props to configure space for label texts of bigger font sizes.
dimensionUnit
prop to configurewidth/height
... Defaults topx
. More context - https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#Length
labelFontSize
andvalueTextFontSize
configurable props.
bugfix
. Handle negative values and custom min/max values forcustomSegmentStops
. Fixes - #51 and #52. ref - https://codesandbox.io/s/jolly-thompson-2k3d7
- new
customSegmentStops
configuration to customize segments, ref: https://codesandbox.io/s/purple-cdn-eu9xf. Complete rewrite of core, where core is modularized and separated from lifecycle methods
- removed unwanted
global
package from dependency. ref: - https://codesandbox.io/s/billowing-lake-9somf
- new option/prop
segmentColors
for giving custom segment colors. Reference - https://palerdot.in/react-d3-speedometer/?path=/story/react-d3-speedometer--custom-segment-colors. ref: - https://codesandbox.io/s/relaxed-silence-c3qkb
maxSegmentLabels
now takes0
as valid value. Addresses - #43
babel 7
runtime issue fixed. Affected versions -0.5.0
to0.5.4
maxSegmentLabels
prop to limit labels for segment. Useful for displaying gradient like effect. Example - https://palerdot.in/react-d3-speedometer/?path=/story/react-d3-speedometer--gradient-effect-with-large-number-of-segments-and-maxsegmentlabels-configcurrentValuePlaceholderStyle
to configure custom placeholder for current value. Example - https://palerdot.in/react-d3-speedometer/?path=/story/react-d3-speedometer--custom-current-value-placeholder-style-for-eg-value
needleHeightRatio
for controlling the height of the needle. Takes a float between 0 and 1 and controls the height.
- Handle
d3
ticks behaviour when we get a single tick. Refer d3/d3-scale#149 for more info
- Bumped d3 version to 5.x
- Handled specific
d3-scale
behaviour (d3/d3-scale#149). Fixes #27
- Handling invalid
needleTransition
prop. Switching to defaulteaseQuadInOut
by throwing a warning.
- Using simple string replace for
currentValueText
instead of template literal for better support for IE - https://caniuse.com/#feat=template-literals
- updating
peerDependencies
withReact 16
REACT 16
updating react version to 16, along with enzyme to version 3.
currentValueText
configuration to display custom current value text.
valueFormat
option for formatting the values. Should be a valid input for - https://github.com/d3/d3-format#locale_format
- Tweaked the positioning of current value element to be 23 points below so that it is legible in smaller speedometers.
forceRender
config option, to rerender the whole component on props change. Previously, only the values are updated and animated.
- new test case for custom
textColor
prop
- new test case for validating default color
- new test case for checking number of segments
- configuring
textColor
- Basic test coverage using enzyme
- Moving to
MIT
license
- Make
needleTransitionDuration
configurable - Make
needleTransition
configurable - make
ringWidth
configurable