aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Cohen Gindi <danielgindi@gmail.com>2020-01-23 10:18:28 +0200
committerDaniel Cohen Gindi <danielgindi@gmail.com>2020-01-23 10:18:28 +0200
commit34fefd28e1f50d8d0406e0aac4cb3909c94eb193 (patch)
tree159592b47692d9bf9b7ed4b3d585fc91c58df09e
parent45240c3723387a0980074a5b4a72e1d2166192a4 (diff)
downloadMPAndroidChart-34fefd28e1f50d8d0406e0aac4cb3909c94eb193.tar.gz
maxHeight didn't account for the last label
https://github.com/danielgindi/Charts/pull/3900
-rw-r--r--MPChartLib/src/main/java/com/github/mikephil/charting/components/Legend.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/MPChartLib/src/main/java/com/github/mikephil/charting/components/Legend.java b/MPChartLib/src/main/java/com/github/mikephil/charting/components/Legend.java
index b7850988..70812925 100644
--- a/MPChartLib/src/main/java/com/github/mikephil/charting/components/Legend.java
+++ b/MPChartLib/src/main/java/com/github/mikephil/charting/components/Legend.java
@@ -703,8 +703,7 @@ public class Legend extends ComponentBase {
width += Utils.calcTextWidth(labelpaint, label);
- if (i < entryCount - 1)
- maxHeight += labelLineHeight + yEntrySpace;
+ maxHeight += labelLineHeight + yEntrySpace;
} else {
wasStacked = true;
width += formSize;