Add bottom-up and right-left orientations for Sankey diagrams#7870
Add bottom-up and right-left orientations for Sankey diagrams#7870wf-r wants to merge 8 commits into
Conversation
|
I'm going to change the target branch from |
904f306 to
5ea67d9
Compare
Rebase to v4.
Adjust node label alignment for vertical case (labels below still need work)
Finalize node label alignment for vertical cases
|
Thanks for having a look (I have rebased on |
camdecoster
left a comment
There was a problem hiding this comment.
This is a great addition and pretty simple to add. Could you please separate out the direction config into a second attribute? I added a suggestion. This will require changes to your code elsewhere, but I don't think it will be too much work. Let me know what you think
Good idea, I changed it accordingly. |


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.
orientationnow accepts:h— horizontal, default (unchanged)left-right— sources left, flow rightward (synonym ofh)right-left— sources right, flow leftward (new)v— vertical (unchanged)top-down— sources top, flow downward (synonym ofv)bottom-up— sources bottom, flow upward (new)Why
So far,
his always left→right andvis 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/vrender identically; the default is unchanged.