Task at hand:
What I've taken a lot at so far:
- Pie chart from [https://github.com/JesperLekland/react-native-svg-charts-examples][2]
Here I divided the entire pie into 50 units of 1 value, inorder to get the Split-bar effect. I can pass the color according to the image shown above. But how can I add the inner lines(red and green) and the data inside? Any help would be appreciated!
So the approach I would take is to make the outer ring a
PieChart
(like you have done), but to make the inner circle aProgressCircle
(https://github.com/JesperLekland/react-native-svg-charts#progresscircle) as this component naturally looks like the inner circle in the picture. You can change itsbackgroundColor
prop to red and itsprogressColor
prop to green.What this exmample doesn't do:
The custom shapes were made with
react-native-svg
, the library that is used byreact-native-svg-charts
internally. You can read its documentation here: https://github.com/react-native-community/react-native-svg.How it looks: