Skip to content

Commit

Permalink
Fixed pie slices separation when there is only one slice
Browse files Browse the repository at this point in the history
Fixed #91
  • Loading branch information
lecho committed Mar 9, 2015
1 parent 56fc837 commit 28a6c94
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ private void drawSlices(Canvas canvas) {

private void drawSeparationLines(Canvas canvas) {
final PieChartData data = dataProvider.getPieChartData();
if(data.getValues().size() < 2){
//No need for separation lines for 0 or 1 slices.
return;
}
final float sliceScale = 360f / maxSum;
float lastAngle = rotation;
final float circleRadius = originCircleOval.width() / 2f;
Expand Down

0 comments on commit 28a6c94

Please sign in to comment.