Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 970aa0c

Browse files
committed
Make base 2.7172828... show up as "e"
1 parent d89bde5 commit 970aa0c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/plots/cartesian/axes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,7 @@ function formatLog(ax, out, hover, extraPrecision, hideexp) {
955955
}
956956
else if(isNumeric(dtick)||((dtick.charAt(0)==='D')&&(mod(x+0.01,1)<0.1))) {
957957
if(['e','E','power'].indexOf(ax.exponentformat)!==-1) {
958+
base = base === Math.E ? 'e' : base;
958959
var p = Math.round(x);
959960
if(p === 0) out.text = 1;
960961
else if(p === 1) out.text = base;

0 commit comments

Comments
 (0)