- a0ce709: Support react v19
- 3bfb426: UMD export removed
- 3bfb426: Package compiled in ES6. Consuming JS engines should be able to interpret features like arrow functions and const.
- 3bfb426:
svg-partial-circle
unbundled and imported via plain import
- d1887ba: Move
@types/svg-path-parser
to dev dependencies
- Improve
labelRenderProps
by using TS generics - Expose chart
PieChartProps
types - Rely on useEffect only to trigger initial animation
- Support React 18
- Decrease bundle size of about 2%
- Widen peerDependencies to include React 17
- Change
extractPercentage
implementation to address a rounding issue instroke-dashoffset
evaluation (#133)
- Chart component exposed as named export instead of default.
- Minimum
react
andreact-dom
peerDependency versions increased to^16.8.0
- Minimum
typescript
version increased to^3.8.0
(due toimport type
) label
prop works as render prop; drop support forboolean
and Element valuessegmentsShift
prop expressed as absoluteviewBox
units instead of radius' percentage- Event handlers signature updated to:
(event, segmentIndex) => void
rx
andry
props replaced bycenter
array propcenter
andradius
props expressed as absoluteviewBox
units instead of percentage of itprop-types
dependency and staticPropTypes
declarations dropped- Dropped support for `data[].style property
- Replaced extendedData startOffset prop with startAngle
injectSVG
dropped in favour of native children prop- requestAnimationFrame existence check removed
- Removed
Object.assign
polyfill
- Gzipped size reduced from 2.6kb to 1.9 kb (-27%)
segmentsStyle
andlabelStyle
accept both value or function
- Default labels vertically aligned with
dominant-baseline: central
(#149)
- Update import declaration to:
import {PieChart} from 'react-minimal-pie-chart'
- Make sure that installed
react
andreact-dom
version is >=16.8.0
- In case
typescript
is used, ensure that installed version is >=3.8
- Migrate
label
prop to provide a render function (see docs about labels) - Replace existing
rx
ry
props withcenter
- Review existing
center
andsegmentsShift
values (now expressed asviewBox
values) - Update
onBlur
,onClick
,onFocus
,onKeyDown
,onMouseOut
,onMouseOver
,segmentsShift
function props to new signatures - Move existing
injectSVG
prop return value tochildren
prop - Use
segmentsStyle
as function instead ofdata[].style
prop - Mind that the root element is now the SVG itself
- Provide an
Object.assign
polyfill to support legacy browser (eg. IE)
- Fix event handler types expecting wrong event as first argument
- Fix
label
prop type declaration when receiving a function (#154) - Fix wrong label position when segmentsShift enabled (#155)
- Allow
segmentsShift
as function to returnundefined
- Improve
sumValues
performance
- Add
segmentsShift
prop to move segments radially and render exploded charts
- Fix regression introduced in
7.1.0
consisting ofreveal
prop being stuck after initial animation
- Add
onBlur
,onFocus
,onKeyDown
callbacks - Add
segmentsTabIndex
to append atabindex
prop to segment paths
- Fix regression bug consisting of
stroke-dasharray
andstroke-dashoffset
attributes being evaluated and appended even when there is no animation
This release introduced a regression bug. Please upgrade to V7.1.0
- Remove
src
from distribution EventHandler
expectsvoid
as return type
- Introduce Typescript natively
- Remove
prop-types
from private components
- Fix chart
cy
being evaluated fromviewBoxSize
width instead of height
ratio
property removed in favour ofviewBoxSize
- fix
NaN
being rendered as SVG path attribute whendata.value
sum equals 0 andtotalValue
is undefined
- fix
reveal
direction with negativelengthAngle
reveal
works same direction aslengthAngle
- Labels vertically aligned using
dominant-baseline
instead ofalignment-baseline
- Add
background
prop to draw segment's background
- Fix
props.data
types
- Transpile bundled
svg-partial-circle
- Provide custom segment style via
props.data[i].style
ReactMinimalPieChart
extendsReact.Component
instead ofReact.PureComponent
- Improve
paddingAngle
implementation to respect the proportions between rendered slices - Add TypeScript types
- Compile with Babel v7
- Update Storybook demo to v5
- Add
sideEffect
flag
- Replace
export { default } from
syntax not supported by TS
- Add support for labels with props:
label
,labelPosition
andlabelStyle
- Minor internal refactoring
- Fix chart to render
data.title
value as<title>
inside<path>
element
- Support
injectSvg
function property to inject any element into rendered<svg>
element
- Support
data.title
property to render<title>
inside<path>
element
- Add UMD export
- Add segments interaction callbacks:
onClick
,onMouseOver
,onMouseOut
- Add
segmentsStyle
prop - Setup up Prettier
- Prevent initial animation when component is unmounted
- Update
react
/react-dom
peer dependency version to accept versions15
and16
- Make SVG element
display: block
to remove undesired spacing
- Compile with Rollup.js to bundle with a transpiled version of
svg-partial-circle v0.2.0
- Migrate React's prop types to external
prop-types
package - Swap
react-addons-test-utils
withreact-test-renderer
asenzyme
required dependencies
- Enable negative
lengthAngle
to configure clockwise and counterclockwise charts - Add
rx
andry
props to set custom chart center coordinates - Add
ratio
prop - Add
radius
prop - Re-evaluate segments size when
paddingAngle
is > 0 - Make counterclockwise charts by default
- Make a pure component
- Add eslint parsing
- Incorporate
svg-partial-circle
lib
- Fix bad imports
- Initial release