Skip to content

Commit 14ac99f

Browse files
committed
scatter: list additionnal variables available in eventData
1 parent 583eb97 commit 14ac99f

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/traces/scatter/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ module.exports = {
2323
// at which we clip all lines to the perimeter
2424
maxScreensAway: 20,
2525

26-
eventDataKeys: ['marker.size', 'marker.color']
26+
eventDataKeys: ['marker.size', 'marker.color', 'marker.symbol', 'marker.opacity']
2727
};

test/jasmine/tests/scatter_test.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -1813,5 +1813,14 @@ describe('Test scatter *clipnaxis*:', function() {
18131813

18141814
describe('event data', function() {
18151815
var mock = require('@mocks/scatter-colorscale-colorbar');
1816-
checkEventData(mock, 540, 260, constants.eventDataKeys);
1816+
var mockCopy = Lib.extendDeep({}, mock);
1817+
1818+
var marker = mockCopy.data[0].marker;
1819+
marker.opacity = [];
1820+
marker.symbol = [];
1821+
for(var i = 0; i < mockCopy.data[0].y.length; ++i) {
1822+
marker.opacity.push(0.5);
1823+
marker.symbol.push('square');
1824+
}
1825+
checkEventData(mockCopy, 540, 260, constants.eventDataKeys);
18171826
});

0 commit comments

Comments
 (0)