Skip to content

Commit 3234332

Browse files
committed
fix: reset minmax if values cleared
1 parent 3c2595c commit 3234332

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/charting/data/DataSet.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,11 @@ export abstract class DataSet<T extends Entry> extends BaseDataSet<T> {
7070
}
7171

7272
calcMinMax() {
73-
if (this.mValues == null || this.mValues.length === 0) return;
74-
7573
this.mYMax = -Infinity;
7674
this.mYMin = Infinity;
7775
this.mXMax = -Infinity;
7876
this.mXMin = Infinity;
77+
if (this.mValues == null || this.mValues.length === 0) return;
7978

8079
for (let index = 0, e: T; index < this.mValues.length; index++) {
8180
e = this.mValues[index];

0 commit comments

Comments
 (0)