Comments (2)
Awesome!
from react-native-gifted-charts.
Hi @AyoCodess 👋
Thanks for requesting this feature.
It is now available from version 1.4.9
onwards.
It can be achieved using the following props-
- ring
- strokeWidth
- strokeColor
- strokeDashArray
Here's an example-
const ringData = [
{value: 5, strokeColor: '#F5C734'},
{value: 15, strokeColor: '#EEE2D2'},
];
return (
<PieChartPro
data={ringData}
ring
strokeWidth={20}
strokeDashArray={[4, 15]}
pieInnerComponent={() => {
return <Text style={{fontSize: 80, fontWeight: '100'}}>25%</Text>;
}}
/>
);
The output of the above code is-
![ring](https://private-user-images.githubusercontent.com/20596944/317855051-d171bdca-688b-48a3-93be-87caf43d1409.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTU5OTE0MTMsIm5iZiI6MTcxNTk5MTExMywicGF0aCI6Ii8yMDU5Njk0NC8zMTc4NTUwNTEtZDE3MWJkY2EtNjg4Yi00OGEzLTkzYmUtODdjYWY0M2QxNDA5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTE4VDAwMTE1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM1OTk3M2U4Mjc2ODZmYjE2NDU0ODllYjE2ZDZlNjljMmM1NWI4ZDA3NTE2OTY4OWUzZjQ5ZTIwZGY2NzE5NjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.o6wSQbsvKvcF2XBynv-MMFc-9fntYVjWLJuA0myJVRU)
Please use the latest version of the library.
from react-native-gifted-charts.
Related Issues (20)
- How to use custom String value on Y axis
- Labels on xAxis are not visible | BarChart HOT 3
- Nested Donut Chart
- Cannot get lineData to show in BarChart (stacked or nonstacked) HOT 1
- Barchart not get index or not show
- Need to add Title for X Axis and Y Axis
- Custom chart horizontal stack
- Bar chart width (spacing) HOT 1
- Highlighted on curved line chart
- (AreaChart) Allow overflow of data points in non-scrollable chart HOT 1
- Type Error: Have any of these errors been reported? HOT 9
- Area chart with transparent background below data
- Candle Stick Chart
- PieChart Error : UIView base class does not support pointerEvent value: box-none HOT 1
- Bars not showing sometimes and fast animation then provided animation time HOT 1
- Need help to implement swipe gesture similar to apple health
- pointerConfig is not working when spacing between the dots is more than 3px
- Change pointerLable style on a certain index in LineChart
- Bar chart with onFocus/pointerConfig (touch and drag) support?
- onBlur or make out of focus area chart props
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-gifted-charts.