Skip to content

Commit f28ee6c

Browse files
Reverted "Improved ticks sync calculations"
Co-authored-by: Mojtaba Samimi <[email protected]>
1 parent 3ca4aed commit f28ee6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plots/cartesian/axes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ function syncTicks(ax) {
12351235
var vali = ax.p2l(pos);
12361236
var val1 = ax.p2l(pos - 0.1);
12371237
var val2 = ax.p2l(pos + 0.1);
1238-
var d = 1 + Math.ceil(Math.log10(Math.abs(val2 - val1)));
1238+
var d = 1 + Math.round(Math.log10(Math.abs(val2 - val1)));
12391239
var e = Math.pow(10, -d);
12401240
var valR = Math.round(vali * e) / e;
12411241
var obj = axes.tickText(ax, valR);

0 commit comments

Comments
 (0)