Skip to content

Commit 0f59ca2

Browse files
committed
speed up zero line logic - remove axes.list when possible
1 parent bcd7c06 commit 0f59ca2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/plots/cartesian/axes.js

+5
Original file line numberDiff line numberDiff line change
@@ -2174,6 +2174,11 @@ axes.doTicksSingle = function(gd, arg, skipTitle) {
21742174
0 : ax._length
21752175
);
21762176

2177+
var plotinfo = fullLayout._plots[counterAxis._mainSubplot];
2178+
if(!(plotinfo.mainplotinfo || plotinfo).overlays.length) {
2179+
return lineNearZero(counterAxis, zeroPosition);
2180+
}
2181+
21772182
var counterLetterAxes = axes.list(gd, counterLetter);
21782183
for(var i = 0; i < counterLetterAxes.length; i++) {
21792184
var counterAxis2 = counterLetterAxes[i];

0 commit comments

Comments
 (0)