react-native-svg-charts
react-native-svg-charts copied to clipboard
PieChart strokeLinejoin doesnt work
What is the problem?
strokeLinejoin: 'round' doesnt do rounded corners to Pie slices
When does it happen?
Using PieChart component
What platform?
iOS, Android
React Native version: 0.57
Code to reproduce
const data = [
347,
500,
153,
].map((value, index) => ({
value,
key: `slise-${index}`,
svg: {
strokeLinejoin: 'round',
fill: COLORS[index],
},
}))
<PieChart
data={data}
startAngle={-Math.PI / 2}
endAngle={Math.PI / 2}
padAngle={0}
outerRadius="100%"
innerRadius="88%"
/>
Result: no rounded corners

using cornerRadius as part of arc property of items provides nearly expected behavior, but it also round corners between see example

Yeah, I bumped into this as well. I would like to only round one of the sides of the arcs, namely the left side of the first arc and the right side of the last arc. Did you find any workaround for this @Knight704 ? Or perhaps can you suggest something that would create this effect @JesperLekland? Thanks.
@hitmanmcc Do you able to create the desired effect? I also needs to achieve same.
@codeapp17 No, we ended up dropping the idea and going a different route, sorry.
@codeapp17 No, we ended up dropping the idea and going a different route, sorry.
No Problem, thanks anyways