Skip to content

Commit c9044fa

Browse files
committed
only clear ax field before regular loop when transforms are present
1 parent 47356cd commit c9044fa

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/plots/plots.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,6 +1961,8 @@ plots.doCalcdata = function(gd, traces) {
19611961
}
19621962
}
19631963

1964+
var hasCalcTransform = false;
1965+
19641966
// transform loop
19651967
for(i = 0; i < fullData.length; i++) {
19661968
trace = fullData[i];
@@ -1978,17 +1980,20 @@ plots.doCalcdata = function(gd, traces) {
19781980

19791981
_module = transformsRegistry[transform.type];
19801982
if(_module && _module.calcTransform) {
1983+
hasCalcTransform = true;
19811984
_module.calcTransform(gd, trace, transform);
19821985
}
19831986
}
19841987
}
19851988
}
19861989

19871990
// clear stuff that should recomputed in 'regular' loop
1988-
for(i = 0; i < axList.length; i++) {
1989-
axList[i]._min = [];
1990-
axList[i]._max = [];
1991-
axList[i]._categories = [];
1991+
if(hasCalcTransform) {
1992+
for(i = 0; i < axList.length; i++) {
1993+
axList[i]._min = [];
1994+
axList[i]._max = [];
1995+
axList[i]._categories = [];
1996+
}
19921997
}
19931998

19941999
// 'regular' loop

0 commit comments

Comments
 (0)