Reputation: 63
How to add values text and slice text outside the chart?
Similar to this image:
Thanks
Upvotes: 4
Views: 1541
Reputation: 1
I got the solution by doing these codes. But don't add a Value text color that matches the background.
dataSet.setXValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
dataSet.setYValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
Upvotes: 0
Reputation: 13027
Please try this:
dataSet.setXValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
dataSet.setYValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
Those properties put labels outside of chart
Upvotes: 8