Skip to content

Commit 7be161b

Browse files
committed
Enable hover for splom
1 parent fc6c895 commit 7be161b

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

src/components/fx/hover.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ function _hover(gd, evt, subplot, noHoverEvent) {
265265
for(curvenum = 0; curvenum < gd.calcdata.length; curvenum++) {
266266
cd = gd.calcdata[curvenum];
267267
trace = cd[0].trace;
268-
if(trace.hoverinfo !== 'skip' && subplots.indexOf(helpers.getSubplot(trace)) !== -1) {
268+
// FIXME: find more efficient way to check splom trace
269+
if((trace.hoverinfo !== 'skip' && subplots.indexOf(helpers.getSubplot(trace)) !== -1) || trace.type === 'splom') {
269270
searchData.push(cd);
270271
}
271272
}

src/plots/cartesian/graph_interact.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = function initInteractions(gd) {
2626
return;
2727
}
2828

29-
if(!fullLayout._has('cartesian') && !fullLayout._has('gl2d')) return;
29+
if(!fullLayout._has('cartesian') && !fullLayout._has('gl2d') && !fullLayout._has('splom')) return;
3030

3131
var subplots = Object.keys(fullLayout._plots || {}).sort(function(a, b) {
3232
// sort overlays last, then by x axis number, then y axis number

src/traces/splom/index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,15 @@ function plotOne(gd, cd0) {
196196

197197
// TODO splom 'needs' the grid component, register it here?
198198

199+
function hoverPoints() {
200+
201+
}
202+
203+
function selectPoints() {
204+
205+
}
206+
207+
199208
module.exports = {
200209
moduleType: 'trace',
201210
name: 'splom',
@@ -208,8 +217,8 @@ module.exports = {
208217

209218
calc: calc,
210219
plot: plot,
211-
hoverPoints: function() {},
212-
selectPoints: function() {},
220+
hoverPoints: hoverPoints,
221+
selectPoints: selectPoints,
213222
style: function() {},
214223

215224
meta: {

0 commit comments

Comments
 (0)