diff --git a/src/traces/sankey/plot.js b/src/traces/sankey/plot.js index 8907d1fc02f..7f32c87c635 100644 --- a/src/traces/sankey/plot.js +++ b/src/traces/sankey/plot.js @@ -10,6 +10,8 @@ var cn = require('./constants').cn; var _ = Lib._; +var linkStyleInitialized = false; + function renderableValuePresent(d) {return d !== '';} function ownTrace(selection, d) { @@ -62,9 +64,38 @@ function nodeNonHoveredStyle(sankeyNode, d, sankey) { } function linkHoveredStyle(d, sankey, visitNodes, sankeyLink) { - sankeyLink.style('fill-opacity', function(l) { + if (!linkStyleInitialized) { + // Figure out whether the user has provided their own sankey-link-hover style. + let styleExists = false; + for (let i=0; i