Skip to content

Commit c0e1bf7

Browse files
committed
unified hoverlabel: fix waterfall symbol
1 parent ae5b9cc commit c0e1bf7

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/components/fx/hover.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,7 @@ function createHoverText(hoverData, opts, gd) {
971971
if(cd.mlcc) pt.mlc = cd.mlcc;
972972
if(cd.mlw) pt.mlw = cd.mlw;
973973
if(cd.mrc) pt.mrc = cd.mrc;
974+
if(cd.dir) pt.dir = cd.dir;
974975
}
975976
pt._distinct = true;
976977

src/components/legend/style.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,14 @@ module.exports = function style(s, gd, legend) {
291291
function styleWaterfalls(d) {
292292
var trace = d[0].trace;
293293

294+
if(d[0]._distinct && d[0].trace[d[0].dir]) {
295+
var cont = d[0].trace[d[0].dir].marker;
296+
d[0].mc = cont.color;
297+
d[0].mlw = cont.line.width;
298+
d[0].mlc = cont.line.color;
299+
return styleBarLike(d, this, 'waterfall');
300+
}
301+
294302
var ptsData = [];
295303
if(trace.visible && trace.type === 'waterfall') {
296304
ptsData = d[0].hasTotals ?

0 commit comments

Comments
 (0)