Skip to content

Commit 502792c

Browse files
committed
In scattergl, selection's eventData returns values in data space
1 parent ed52205 commit 502792c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/traces/scattergl/select.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ var styleTextSelection = require('./edit_style').styleTextSelection;
55

66
module.exports = function select(searchInfo, selectionTester) {
77
var cd = searchInfo.cd;
8+
var xa = searchInfo.xaxis;
9+
var ya = searchInfo.yaxis;
810
var selection = [];
911
var trace = cd[0].trace;
1012
var stash = cd[0].t;
@@ -33,8 +35,8 @@ module.exports = function select(searchInfo, selectionTester) {
3335
els.push(i);
3436
selection.push({
3537
pointNumber: i,
36-
x: x[i],
37-
y: y[i]
38+
x: xa.c2d(x[i]),
39+
y: ya.c2d(y[i])
3840
});
3941
} else {
4042
unels.push(i);

0 commit comments

Comments
 (0)