1.0.2 • Published 6 years ago
react-animation-donut v1.0.2
A simple react donut component with animation.
Live demo with examples
https://react-animation-donut.netlify.com/
GitHub
https://github.com/babypanda111/react-animation-donut
NPM
https://www.npmjs.com/package/react-animation-donut
Usage
npm install react-animation-donut --save
In your React component:
import AnimateDonut from 'react-animation-donut';
Simple example:
<AnimateDonut
donutData={[
{
color: '#00ffff',
count: 75,
name: 'sample 1'
},
{
color: '#0080ff',
count: 25,
name: 'smaple 2'
},
{
color: '#cc99ff',
count: 50,
name: 'smaple 3'
},
]}
width="200"
height="200"
radius="70"
c="100"
strokeWidth="30"
showList
/>
Props (all optional)
Prop | Type | Default |
---|---|---|
hidden | bool | |
width | number | 200 |
height | number | 200 |
radius | number | 80 |
c | number | 100 |
strokeWidth | number | 20 |
donutData | array | |
showList | bool |