2.0.2 • Published 7 years ago

react-native-semi-circular-gauge v2.0.2

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

Gauge component for React Native

React Native component for displaying semi circular gauge, with animation. Works on both iOS & Android.

You might also be interested in my blogs.

Installation

npm install react-native-semi-circular-gauge

Then link the ART library found in node_modules/react-native/Libraries/ART/ART.xcodeproj to your xcode project. (More Info)

Usage

import AnimatedSemiCircularGauge from 'react-native-semi-circular-gauge';

And then in your render method:

<AnimatedSemiCircularGauge
    chartWidth={100}
    strokeWidth={10}
    fill={20}
    prefill={-50}/>

Props

NamePropTypeRequiredDefault ValueDescription
styleObjectNoNoneView.propTypes.style object for the outer conatiner that comprises the chart
chartWidthNumberYesNonewidth of the chart, height is determined automatically
fillNumberYesNoneamount of the chart to be filled
prefillNumberNo0starting point for the chart that is filled till props.fill
strokeWidthNumberYesNonewidth of the stroke that is used to draw the chart
tensionNumberYesRNdefaultused by the animated chart component more info
frictionNumberYesRNdefaultused by the animated chart component

License

MIT