Pie chart background changes when slice too small

2019-04-11 22:03发布

问题:

Please help me out from this problem in pie-chart using MPAndroidChart

This is a library bug.

When I have a pie slice that is too small, the color for that slice bleeds into the chart background. Like in the pictures below - you can see the yellow color has bled.

I'm setting static float data in setData():-

private void setData(int count, float range) {
     yVals1.add(new Entry(100.9f, 0));
     yVals1.add(new Entry(0.01f, 1));
}

It means when we enter a huge difference between 2 values then this problem will arise. Please help me out.