Skip to content

Commit 26f9099

Browse files
committed
Fix hover label exponent hiding or gl3d log hover
1 parent f428026 commit 26f9099

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/plots/cartesian/axes.js

+11
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,17 @@ function formatDate(ax, out, hover, extraPrecision) {
12981298
function formatLog(ax, out, hover, extraPrecision, hideexp) {
12991299
var dtick = ax.dtick,
13001300
x = out.x;
1301+
1302+
if(hideexp === 'never') {
1303+
// If this is a hover label, then we must *never* hide the exponent
1304+
// for the sake of display, which could give the wrong value by
1305+
// potentially many orders of magnitude. If hideexp was 'never', then
1306+
// it's now succeeded by preventing the other condition from automating
1307+
// this choice. Thus we can unset it so that the axis formatting takes
1308+
// precedence.
1309+
hideexp = '';
1310+
}
1311+
13011312
if(extraPrecision && ((typeof dtick !== 'string') || dtick.charAt(0) !== 'L')) dtick = 'L3';
13021313

13031314
if(ax.tickformat || (typeof dtick === 'string' && dtick.charAt(0) === 'L')) {

0 commit comments

Comments
 (0)