You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: Sankey warning breaks in @plotly/d3-sankey v0.12.3 #7832
The upgrade to @plotly/d3-sankey v0.12.3 (in #7830) will break the warning here:
if(sankey.nodePadding()<nodePad){Lib.warn('node.pad was reduced to ',sankey.nodePadding(),' to fit within the figure.');}
In @plotly/[email protected], calling sankey.nodePadding() after running the layout returned the effective (post-clamp) padding value. In 0.12.3 the getter returns the user-configured value instead, because upstream split the internal state into separate dy (configured) and py (effective) variables.
After the upgrade, sankey.nodePadding() always equals nodePad, so the comparison is never true and the warning never fires. The layout itself still clamps correctly - only the diagnostic is affected.
Notes
Options to address the issue:
Remove the warning entirely
Derive the effective padding from the laid-out node positions (e.g. measure the gap between consecutive nodes in the densest column)
I decided that the best path forward is to expose the property this warning relies on in a future update to plotly/d3-sankey. Once that's available, we can get this fixed. Issue filed in plotly/d3-sankey#13.
Activity
fix(sankey): derive effective node.pad clamp from layout geometry
fix(sankey): derive effective node.pad clamp from layout geometry
camdecoster commentedon Sep 28, 2026
I decided that the best path forward is to expose the property this warning relies on in a future update to plotly/d3-sankey. Once that's available, we can get this fixed. Issue filed in plotly/d3-sankey#13.