Skip to content

Commit 0668d30

Browse files
committed
Fixed a bug where a pie slice without highlight enabled is hidden
ChartsOrg/Charts#3969
1 parent 34fefd2 commit 0668d30

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

MPChartLib/src/main/java/com/github/mikephil/charting/renderer/PieChartRenderer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ protected void drawDataSet(Canvas c, IPieDataSet dataSet) {
258258
}
259259

260260
// Don't draw if it's highlighted, unless the chart uses rounded slices
261-
if (mChart.needsHighlight(j) && !drawRoundedSlices) {
261+
if (dataSet.isHighlightEnabled() && mChart.needsHighlight(j) && !drawRoundedSlices) {
262262
angle += sliceAngle * phaseX;
263263
continue;
264264
}
@@ -830,8 +830,7 @@ public void drawHighlighted(Canvas c, Highlight[] indices) {
830830
continue;
831831

832832
IPieDataSet set = mChart.getData()
833-
.getDataSetByIndex(indices[i]
834-
.getDataSetIndex());
833+
.getDataSetByIndex(indices[i].getDataSetIndex());
835834

836835
if (set == null || !set.isHighlightEnabled())
837836
continue;

0 commit comments

Comments
 (0)