Skip to content

Commit c1404fb

Browse files
committed
change stroke-opacity on hover
1 parent ed87295 commit c1404fb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/traces/sankey/plot.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ function linkHoveredStyle(d, sankey, visitNodes, sankeyLink) {
7373
var label = sankeyLink.datum().link.label;
7474

7575
sankeyLink.style('fill-opacity', 0.4);
76+
sankeyLink.style('stroke-opacity', 0.4);
7677

7778
if(label) {
7879
ownTrace(sankey, d)
7980
.selectAll('.' + cn.sankeyLink)
8081
.filter(function(l) {return l.link.label === label;})
81-
.style('fill-opacity', 0.4);
82+
.style('fill-opacity', 0.4)
83+
.style('stroke-opacity', 0.4);
8284
}
8385

8486
if(visitNodes) {
@@ -94,12 +96,13 @@ function linkNonHoveredStyle(d, sankey, visitNodes, sankeyLink) {
9496
var label = sankeyLink.datum().link.label;
9597

9698
sankeyLink.style('fill-opacity', function(d) {return d.tinyColorAlpha;});
97-
99+
sankeyLink.style('stroke-opacity', function(d) {return d.tinyColorAlpha;});
98100
if(label) {
99101
ownTrace(sankey, d)
100102
.selectAll('.' + cn.sankeyLink)
101103
.filter(function(l) {return l.link.label === label;})
102-
.style('fill-opacity', function(d) {return d.tinyColorAlpha;});
104+
.style('fill-opacity', function(d) {return d.tinyColorAlpha;})
105+
.style('stroke-opacity', function(d) {return d.tinyColorAlpha;});
103106
}
104107

105108
if(visitNodes) {

0 commit comments

Comments
 (0)