Comments (4)
Can you please provide a code snippet?
Also note a few disclaimers in the strokeCap section of our docs, which might be applying here.
strokeCap ( round , butt ) defaults to butt - string, optional
PLEASE NOTE If using strokeCap={'round'} it is highly recommended to use a higher innerRadius (around 60% of radius and higher) in addition to not having very small percentage sections. This will ensure proper display. We hope to address these issues in future PRs
from react-native-pie.
@zgordon01 thanks for the response, I did read the disclaimers, however even if I change/play around with the radius and inner_Radius, I still get the same results. below is the snippet of code you asked for.
render() {
return (
<View style={styles.container}>
<View style={styles.pieViewWrapper}>
<View style={styles.yourConnections}>
<Pie
radius={120}
innerRadius={100}
sections={[
{
percentage: 50,
color: '#48d1cc',
},
]}
backgroundColor="#EBECF0"
strokeCap={'round'}
/>
</View>
</View>
<View style={styles.pieViewWrapper}>
<View style={styles.connectionsPerfomance}>
<Pie
radius={150}
innerRadius={130}
sections={[
{
percentage: 90,
color: '#66cdaa',
},
]}
backgroundColor="#EBECF0"
strokeCap={'round'}
/>
</View>
</View>
<View style={styles.pieViewWrapper}>
<View style={styles.communityPerfomance}>
<Pie
radius={180}
innerRadius={160}
sections={[
{
percentage: 40,
color: '#ffd700',
},
]}
backgroundColor="#EBECF0"
strokeCap={'round'}
/>
</View>
</View>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
justifyContent: 'center',
alignItems: 'center',
height: height * 0.5,
width: width,
},
pieViewWrapper: {
position: 'absolute',
justifyContent: 'center',
alignItems: 'center',
},
yourConnections: {
alignItems: 'center',
justifyContent: 'center',
},
connectionsPerfomance: {
alignItems: 'center',
justifyContent: 'center',
},
communityPerfomance: {
alignItems: 'center',
justifyContent: 'center',
},
points: {
color: '#000',
fontSize: 35,
fontWeight: 'bold',
},
pointsText: {
color: 'grey',
fontSize: 10,
alignSelf: 'center',
},
})
from react-native-pie.
@zgordon01, @nihgwu I have managed to figure out what was going wrong with the strokeCap
prop on version 1.1.2
of react-native-pie
I have sent a PR for it.
from react-native-pie.
I'm still getting this issue how do u guys solve this
from react-native-pie.
Related Issues (20)
- How to make the pie clickable? HOT 2
- How to create the pie color as gradient?
- Pie Label HOT 2
- It shows black rectangle on Android HOT 1
- Requirement of Library update for RN0.60+ HOT 20
- Use case requiring separation of series and color
- Feature Request - testIDs HOT 1
- Undefined is not an object _react.PropType.array HOT 1
- Missing License
- Version 1.0.0 Deployment HOT 5
- Android not rendering Pie HOT 6
- Module `@react-native-community/art` does not exist in the Haste module map HOT 2
- duplicate key HOT 1
- Error while updating property 'stroke' in shadow node of type: ARTShape HOT 7
- No longer compatible with Expo? HOT 3
- Cannot read property 'slice' of null - when blank color passed
- Undefined is not an object (evaluating 'this.hex') HOT 1
- Migrating from react-native-community/art to react-native-svg
- React Native - How to give this Curve Direction same as image HOT 1
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-pie.