Mpandroidchart: Pie chart radius change

Created on 29 Jun 2016  路  6Comments  路  Source: PhilJay/MPAndroidChart

I am not able to reduce pie chart radius. Only hole radius and transparent circle radius can be altered.

Most helpful comment

@Shanmugapriyan22 You can use pieChart.setHoleRadius(35);, So the more you set hole radius the chart will become thinner.

All 6 comments

That's because the radius of the chart is determined by the size of the chart-view. So of you want to change the radius, change the size of the view.

@PhilJay Hi i want same size of the chart view but i want to reduce chart radius thickness.

@Shanmugapriyan22 You can use pieChart.setHoleRadius(35);, So the more you set hole radius the chart will become thinner.

@PhilJay Can the entries inside the pie chart be swapped?

the right solution is dataSet.setSelectionShift(10);, that reduce the radius by 10

@Shanmugapriyan22 You can use pieChart.setHoleRadius(35);, So the more you set hole radius the chart will become thinner.

but if we decrease the hole radius then the color becomes uneven, I want to achieve a thicker slice pie.
WhatsApp Image 2020-12-07 at 6 11 47 PM

Was this page helpful?
0 / 5 - 0 ratings