Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/traces/contourgl/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ proto.handlePick = function(pickResult) {
],
textLabel: this.textLabels[index],
name: this.name,
pointIndex: [xIndex, yIndex],
pointIndex: [yIndex, xIndex],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @dfcreative for that #1825 (comment)

hoverinfo: this.hoverinfo
};
};
Expand Down
2 changes: 1 addition & 1 deletion src/traces/heatmapgl/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ proto.handlePick = function(pickResult) {
],
textLabel: this.textLabels[index],
name: this.name,
pointIndex: [xIndex, yIndex],
pointIndex: [yIndex, xIndex],
hoverinfo: this.hoverinfo
};
};
Expand Down
33 changes: 33 additions & 0 deletions test/jasmine/tests/gl2d_click_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,39 @@ describe('Test hover and click interactions', function() {
.then(done);
});

it('should output correct event data for heatmapgl (asymmetric case) ', function(done) {
var _mock = {
data: [{
type: 'heatmapgl',
z: [[1, 2, 0], [2, 3, 1]],
text: [['a', 'b', 'c'], ['D', 'E', 'F']],
hoverlabel: {
bgcolor: [['red', 'blue', 'green'], ['cyan', 'pink', 'black']]
}
}]
};

var run = makeRunner([540, 150], {
x: 2,
y: 1,
curveNumber: 0,
pointNumber: [1, 2],
bgColor: 'rgb(0, 0, 0)',
borderColor: 'rgb(255, 255, 255)',
fontSize: 13,
fontFamily: 'Arial',
fontColor: 'rgb(255, 255, 255)'
}, {
noUnHover: true,
msg: 'heatmapgl'
});

Plotly.plot(gd, _mock)
.then(run)
.catch(fail)
.then(done);
});

it('should output correct event data for scattergl after visibility restyle', function(done) {
var _mock = Lib.extendDeep({}, mock4);

Expand Down