Skip to content

Add bottom-up and right-left orientations for Sankey diagrams#7870

Open
wf-r wants to merge 4 commits into
plotly:v4.0from
wf-r:Add_bottom-up_and_right-left_orientation_for_Sankey
Open

Add bottom-up and right-left orientations for Sankey diagrams#7870
wf-r wants to merge 4 commits into
plotly:v4.0from
wf-r:Add_bottom-up_and_right-left_orientation_for_Sankey

Conversation

@wf-r

@wf-r wf-r commented Jun 26, 2026

Copy link
Copy Markdown

What

See #7865

Adds two new flow directions to Sankey traces and gives the existing horizontal/vertical modes explicit, direction-named aliases, fully backward compatible.

orientation now accepts:

  • h — horizontal, default (unchanged)
  • left-right — sources left, flow rightward (synonym of h)
  • right-left — sources right, flow leftward (new)
  • v — vertical (unchanged)
  • top-down — sources top, flow downward (synonym of v)
  • bottom-up — sources bottom, flow upward (new)

Why

So far, h is always left→right and v is always top-down. Right-to-left and build-up (bottom-up) flows are common conventions with no equivalent today. This closes both gaps additively, without changing any existing rendering.

Backward compatibility

Purely additive. Existing figures using h/v render identically; the default is unchanged.

@camdecoster camdecoster self-assigned this Jul 20, 2026
@camdecoster

Copy link
Copy Markdown
Contributor

I'm going to change the target branch from master to our upcoming major version branch, v4.0. We've some changes in the Sankey code and I'd like to add your changes against that. If you have time, it would be great to get this in for that version. I'll leave you a review tomorrow.

@camdecoster
camdecoster changed the base branch from master to v4.0 July 20, 2026 23:19
@wf-r
wf-r force-pushed the Add_bottom-up_and_right-left_orientation_for_Sankey branch from 904f306 to 5ea67d9 Compare July 21, 2026 04:54
wfr added 4 commits July 21, 2026 07:01
Adjust node label alignment for vertical case (labels below still need work)
Finalize node label alignment for vertical cases
@wf-r

wf-r commented Jul 21, 2026

Copy link
Copy Markdown
Author

Thanks for having a look (I have rebased on v4.0 for the moment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants