Skip to content

Commit 6c00814

Browse files
committed
fix bugs I introduced with my "cleanup" while adding log e/E format
1 parent 4160081 commit 6c00814

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/plots/cartesian/axes.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,10 @@ function formatLog(ax, out, hover, extraPrecision, hideexp) {
10941094
hideexp = '';
10951095
}
10961096

1097-
if(extraPrecision && (dtChar0 !== 'L')) dtick = 'L3';
1097+
if(extraPrecision && (dtChar0 !== 'L')) {
1098+
dtick = 'L3';
1099+
dtChar0 = 'L';
1100+
}
10981101

10991102
if(tickformat || (dtChar0 === 'L')) {
11001103
out.text = numFormat(Math.pow(10, x), ax, hideexp, extraPrecision);
@@ -1106,7 +1109,7 @@ function formatLog(ax, out, hover, extraPrecision, hideexp) {
11061109
if(exponentFormat === 'power' || (isSIFormat(exponentFormat) && beyondSI(p))) {
11071110
if(p === 0) out.text = 1;
11081111
else if(p === 1) out.text = '10';
1109-
out.text = '10<sup>' + (p > 1 ? '' : MINUS_SIGN) + absP + '</sup>';
1112+
else out.text = '10<sup>' + (p > 1 ? '' : MINUS_SIGN) + absP + '</sup>';
11101113

11111114
out.fontSize *= 1.25;
11121115
}

0 commit comments

Comments
 (0)