Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG]: Sankey warning breaks in @plotly/d3-sankey v0.12.3

Open
#7,832 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
d3, javascript

Research direction

Start in src/traces/sankey/render.js at the warning around lines 76-78, then compare the upgraded @plotly/d3-sankey v0.12.3 padding API with the laid-out node positions. Resolve how the effective padding should be detected or whether the warning should be removed, and verify that the diagnostic behavior matches the clamped layout.

Written by the indexing model from the issue text.

Description

bug P3 size: 1
Description

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)
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
1d 19h
Merged PRs (30d)
21

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from plotly/plotly.js

All issues in plotly/plotly.js

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.