Open bberak opened 4 years ago
The hideLegend
implementation is pretty basic and does not support this right now. Fixing this would be an awesome PR!
Cool, I'll take a look - cheers!
Anything new about this?
anything new about this ?
found a temporary solution: style={{marginLeft:'auto',marginRight:'auto',left:0,right:0}}
Try this:
<PieChart
width={220}
height={220}
center={[50, 0]}
data={summary_chart}
hasLegend={false}
chartConfig={{
color: (opacity = 1) => `rgba(0, 0, 0, ${opacity})`,
}}
accessor="population"
backgroundColor="transparent"
paddingLeft="0"
absolute
/>
By using the center prop, you can control the chart's position within its container. Combine this with fixed width and height to achieve the desired layout.
Hi there,
Thanks for maintaining this project - it looks really great :)
Is it possible to center the PieChart? Mine a bit off-center
I'm using v4.1.0 and my code is below:
Cheers!