Skip to content

Commit 1de836a

Browse files
committed
Remove unexpected dash line during linear animation
ChartsOrg/Charts#4094
1 parent 0668d30 commit 1de836a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ protected void drawLinear(Canvas c, ILineDataSet dataSet) {
326326
if (mLineBuffer.length <= pointsPerEntryPair * 2)
327327
mLineBuffer = new float[pointsPerEntryPair * 4];
328328

329-
for (int j = mXBounds.min; j <= mXBounds.range + mXBounds.min; j++) {
329+
int max = mXBounds.min + mXBounds.range;
330+
331+
for (int j = mXBounds.min; j < max; j++) {
330332

331333
Entry e = dataSet.getEntryForIndex(j);
332334
if (e == null) continue;

0 commit comments

Comments
 (0)