Skip to content

Commit 96aa46e

Browse files
authored
Merge pull request #6870 from plotly/fix-selection-double-y-axis
Fix interacting with selection on subplots with overlaid axes
2 parents ac983b3 + 91e7433 commit 96aa46e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

draftlogs/6870_change.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fix bug where extending an existing box/lasso selection on traces with overlaying axes didn't update the selection [[#6870](https://github.com/plotly/plotly.js/pull/6870)].

src/components/selections/select.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -809,8 +809,8 @@ function determineSearchTraces(gd, xAxes, yAxes, subplot) {
809809
var sankeyInfo = createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]);
810810
searchTraces.push(sankeyInfo);
811811
} else {
812-
if(xAxisIds.indexOf(trace.xaxis) === -1) continue;
813-
if(yAxisIds.indexOf(trace.yaxis) === -1) continue;
812+
if(xAxisIds.indexOf(trace.xaxis) === -1 && (!trace._xA || !trace._xA.overlaying)) continue;
813+
if(yAxisIds.indexOf(trace.yaxis) === -1 && (!trace._yA || !trace._yA.overlaying)) continue;
814814

815815
searchTraces.push(createSearchInfo(trace._module, cd,
816816
getFromId(gd, trace.xaxis), getFromId(gd, trace.yaxis)));

0 commit comments

Comments
 (0)