0.1.4 • Published 2 years ago

donut-progress v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

donut-progress-react-native

A highly customisable animated donut progress chart for react native

Installation

npm install donut-progress

npm.io

Usage

<DonutProgress 
    color='cyan' 
    appendText="%" 
    edgeCurved 
    fontSize={30} 
    radius={100} 
    strokeWidth={10} 
    duration={1500} 
    percentage={86} 
    max={100} 
/>

Available props

Available propsProp typesDescriptionDefault value
percentagenumberValue to be displayed in the graph75
maxnumberMax value of donut chart100
radiusnumberRadius of donut chrat40
strokeWidthnumberThickness of the circular bar10
durationnumberDuration of the animation (in ms)500
colorstringchart color"#3A50CF"
delaynumberTime delay in ms to wait before the animation starts500
textColorstringColor of the text within the donut chartDefaulted to 'color' property passed
fontSizenumberFont sizeDefaulted to: radius/2
fontWeightstringFont weight500
bgStrokeOpacitystringOpacity of the background of the progress bar'0.2'
rotationnumberOrientation of the starting point of the donut chart. (passing 180 will place the starting point of the graph at the bottom)0
appendTextstringString to be appended after the percentage value passed (eg: %)null
edgeCurvedbooleanParameter to define if the edges of the chart will be rounded or flattrue
fractionbooleanParameter to define if the text inside the chart is a fraction or not. When set to true, will default to: /false
secondaryColorstringSets the color of the denominator of the fraction if fraction is passed as trueDefaulted to 'color' property passed
barColorstringSets the color of the fraction bar, if fraction param is passed as trueDefaulted to 'color' property passed

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago