Skip to content

Commit 73d5438

Browse files
committed
fix issue 5585 for scatter and scattergl
1 parent d077ee7 commit 73d5438

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/traces/scatter/format_labels.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ module.exports = function formatLabels(cdi, trace, fullLayout) {
99
var xa = Axes.getFromTrace(mockGd, trace, 'x');
1010
var ya = Axes.getFromTrace(mockGd, trace, 'y');
1111

12-
labels.xLabel = Axes.tickText(xa, cdi.x, true).text;
13-
labels.yLabel = Axes.tickText(ya, cdi.y, true).text;
12+
var x = cdi.x;
13+
var y = cdi.y;
14+
15+
if(xa.type === 'log') x = xa.c2r(x);
16+
if(ya.type === 'log') y = ya.c2r(y);
17+
18+
labels.xLabel = Axes.tickText(xa, x, true).text;
19+
labels.yLabel = Axes.tickText(ya, y, true).text;
1420

1521
return labels;
1622
};

0 commit comments

Comments
 (0)