Skip to content

Commit dc565d9

Browse files
author
imartinezvazquez
committed
autoTickRound: use default minexponent if undefined
1 parent ba408aa commit dc565d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plots/cartesian/axes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,8 @@ function autoTickRound(ax) {
10421042

10431043
var maxend = Math.max(Math.abs(rng[0]), Math.abs(rng[1]));
10441044
var rangeexp = Math.floor(Math.log(maxend) / Math.LN10 + 0.01);
1045-
if(Math.abs(rangeexp) > ax.minexponent) {
1045+
var minexponent = ax.minexponent === undefined ? 3 : ax.minexponent;
1046+
if(Math.abs(rangeexp) > minexponent) {
10461047
if(isSIFormat(ax.exponentformat) && !beyondSI(rangeexp)) {
10471048
ax._tickexponent = 3 * Math.round((rangeexp - 1) / 3);
10481049
} else ax._tickexponent = rangeexp;

0 commit comments

Comments
 (0)