Skip to content

Commit e6edb3d

Browse files
committed
fix range selector position logic for overlaying axes
1 parent c837359 commit e6edb3d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/rangeselector/defaults.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ function getPosDflt(containerOut, layout, counterAxes) {
8383

8484
var posY = 0;
8585
for(var i = 0; i < anchoredList.length; i++) {
86-
posY = Math.max(layout[anchoredList[i]].domain[1], posY);
86+
var domain = layout[anchoredList[i]].domain;
87+
if(domain) posY = Math.max(domain[1], posY);
8788
}
8889

8990
return [containerOut.domain[0], posY + constants.yPad];

test/jasmine/tests/range_selector_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe('range selector defaults:', function() {
161161
},
162162
yaxis2: {
163163
anchor: 'x',
164-
domain: [0.3, 0.55]
164+
overlaying: 'y'
165165
},
166166
yaxis3: {
167167
anchor: 'x',

0 commit comments

Comments
 (0)