Mpandroidchart: Bug in background Color because error in PieChart when percent equal 0,0%

Created on 6 Apr 2016  路  5Comments  路  Source: PhilJay/MPAndroidChart

Hello Phil,
after apply the correction said in the issue #1647, my PieChart with one entry worked fine.
But my PieChart having any entries and one or more entry stay with 0,0%, the background color this component (slice), is apply to my parent background, in this case my mChart;

See the screenShot;

First its Oks,
screenshot_2016-04-06-14-02-02

Second and Third reports the bug in background color;
screenshot_2016-04-06-14-02-09
screenshot_2016-04-06-14-02-15

Thanks for listening.

Most helpful comment

The issue is related to the slicespace --> pieDataSet.setSliceSpace(...)

If the "size" of the slice-space exceeds the size of a pie slice, this issue occurs. I suggest you remove the slice space if you have extremely small slices.

All 5 comments

The issue is related to the slicespace --> pieDataSet.setSliceSpace(...)

If the "size" of the slice-space exceeds the size of a pie slice, this issue occurs. I suggest you remove the slice space if you have extremely small slices.

done and worked.. thank you

thanks , did work

What if not setting SliceSpace is not a option?
I was thinking of adding extra entries to simulate these spaces, but those spaces get their X value written out 2, which is a problem. is it possible to write out every second x value,
dataSet.setXValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE); //For everyone other?

Or can you recommand a different solution?

When i add 3 pie entries with whole 3 have value 1. the graph is completely empty. when we click on a slice its get highlighting . It will be very helpful to me if can give me a solution for this. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

galex picture galex  路  3Comments

AiTheAnswer picture AiTheAnswer  路  3Comments

ChenZeFengHi picture ChenZeFengHi  路  3Comments

SutharRohit picture SutharRohit  路  3Comments

Giammaofwar picture Giammaofwar  路  3Comments