-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix arc drawing when sweep >= 360 #15042
Conversation
Sample code: <View style={styles.container}>
<Pie
radius={100}
series={[10, 20, 30, -40]}
colors={['red', 'lime', 'blue', 'yellow']} />
<Pie
radius={100}
innerRadius={60}
series={[10, 20, 30, 400]}
colors={['#f00', '#0f0', '#00f', '#ff0']} />
<View>
<Pie
radius={50}
innerRadius={45}
series={[100]}
colors={['#f00']}
backgroundColor='#ddd' />
<View style={styles.gauge}>
<Text style={styles.gaugeText}>100%</Text>
</View>
</View>
</View> |
@facebook-github-bot label Needs more information Generated by 🚫 dangerJS |
@nihgwu That's great! |
@shergin https://snack.expo.io/By3_faIPb |
@shergin Any thing should I do to make this be merged? |
Android documentation said:
So, it means that it already does not support arcs "bigger" that 360 deg (but iOS does, I assume), so it means that this should not introduce a regression here. Let's try to land it on Monday. |
@shergin another release is coming, can we make this in? |
@shergin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
I hit this issue in my own component https://github.com/nihgwu/react-native-pie, and find this https://stackoverflow.com/questions/19383842/weird-behaviour-in-drawing-a-ring-using-path-arcto-in-android, after this change, it looks exactly the same on both Android and iOS