Skip to content

Commit 1271382

Browse files
committed
axes.expand: ensure domain constraint before adjusting extrappad
1 parent 3931973 commit 1271382

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plots/cartesian/axes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ axes.expand = function(ax, data, options) {
457457

458458
// domain-constrained axes: base extrappad on the unconstrained
459459
// domain so it's consistent as the domain changes
460-
if(extrappad && ax._inputDomain) {
460+
if(extrappad && (ax.constrain === 'domain') && ax._inputDomain) {
461461
extrappad *= (ax._inputDomain[1] - ax._inputDomain[0]) /
462462
(ax.domain[1] - ax.domain[0]);
463463
}

0 commit comments

Comments
 (0)