Sankey Link Hover Color

Is it possible to change the color of the sankey link on hover or click event? Ideally the color would be completely different than the static link color in order to be more noticeable when hovered or clicked. I’m not talking about an opacity change necessarily, I would like 2 completely different colors.

The default is light gray and slightly darker gray on hover. According to the below post in 2018, the LinkHoverStyle is hardcoded to simply change the opacity of the same color when hovered. As mentioned, this is not always ideal and I think being able to have a color difference between hover and non-hovered data would be much more effective. Particularly on a sankey with many nodes where the trace can get lost for the user because the difference between light gray/color and dark gray/color is not discernible. Simply put, the slight opacity change can be a limiting factor to the visualization’s effectiveness.

P.S I’m using Python, if that matters at all.


Hi, had the same challenge here. Found the following solution :