Hi @PhilJay,
just wanna to say you many thanks for your great library.
I'm playing with PieChart and I found some extra padding above it when using Legend.
Could you please help me to figure out how to fix it?

Also the same extra padding appears when I'm trying to align Legend with BOTTOM_CENTER. Another bad news is that Legend starting to overlap PieChart, please take a look at screenshot below

My code is so simple as bundled samples, here it is:
<com.github.mikephil.charting.charts.PieChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_centerInParent="true"
android:layout_height="345dp" />
mChart = (PieChart) findViewById(R.id.chart);
mChart.setDrawLegend(true);
setData(3, 100); // the same as in examples
mChart.animateXY(1500, 1500);
Legend l = mChart.getLegend();
l.setPosition(LegendPosition.RIGHT_OF_CHART);
Is there any way just to remove this extra padding at top?
Thank you in advance!
Seems like an issue in the calculateOffsets() method of the PieChart. I'm looking into it.
Regards,
Phil
Thank you for taking time!
Please try out the latest .jar file, the problem should be fixed now.
Hi @PhilJay,
sorry for delay and big thanks for hot fix from your side!
Now it works fine for me!
@PhilJay i want to set some extra padding in barchart bottom..which method ?
@LeoYe168, give a try via Chart.setExtraBottomOffset(n); //n > default 15
@coolscott 3ks
Most helpful comment
@LeoYe168, give a try via Chart.setExtraBottomOffset(n); //n > default 15