Hey there!
I'm trying to get a PieChart aligned to the left in a grid-like structure, but the chart displayed is very small, because of extra padding around it taking up the space. I've tried all sorts of different ways of getting rid of the padding, to no avail. Latest try was
health.getViewPortHandler().restrainViewPort(0, 0, 0, 0);
but again, nothing.
Any ideas?
Have you tried calling chart.invalidate() afterwards?
Yupp, it doesn't have any effect.
I just checked it out.
The PieChart does have an offset of 10 by default + the space that is needed for the slices that are "selected" and therefore bigger.
I just fixed this issue. If you now call this:
pieDataSet.setSelectionShift(0)
there should be no offset at all. If you have a selection shift (distance) > 0, than this will be the minimum offset.
Most helpful comment
I just checked it out.
The
PieChartdoes have an offset of 10 by default + the space that is needed for the slices that are "selected" and therefore bigger.I just fixed this issue. If you now call this:
pieDataSet.setSelectionShift(0)there should be no offset at all. If you have a selection shift (distance) > 0, than this will be the minimum offset.