Skip to content

Commit

Permalink
scatter: list additionnal variables available in eventData
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinerg committed Nov 14, 2018
1 parent 583eb97 commit 14ac99f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/traces/scatter/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ module.exports = {
// at which we clip all lines to the perimeter
maxScreensAway: 20,

eventDataKeys: ['marker.size', 'marker.color']
eventDataKeys: ['marker.size', 'marker.color', 'marker.symbol', 'marker.opacity']
};
11 changes: 10 additions & 1 deletion test/jasmine/tests/scatter_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1813,5 +1813,14 @@ describe('Test scatter *clipnaxis*:', function() {

describe('event data', function() {
var mock = require('@mocks/scatter-colorscale-colorbar');
checkEventData(mock, 540, 260, constants.eventDataKeys);
var mockCopy = Lib.extendDeep({}, mock);

var marker = mockCopy.data[0].marker;
marker.opacity = [];
marker.symbol = [];
for(var i = 0; i < mockCopy.data[0].y.length; ++i) {
marker.opacity.push(0.5);
marker.symbol.push('square');
}
checkEventData(mockCopy, 540, 260, constants.eventDataKeys);
});

0 comments on commit 14ac99f

Please sign in to comment.