-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Sankey issue #3140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
(reported via support channels) |
Interesting... what's happening is we need to generate a node/link thickness scaling, and we do so by taking the height of a column, subtracting off n-1 paddings (for n nodes in that column), and scaling all nodes so the sum of their thicknesses fills the remaining space. The problem is that the requested padding is more than the available space, so the scaling factor goes negative, and apparently we never considered this possibility before. The way we appear to draw it, negatively scaled nodes get zero height, and negatively scaled links get drawn with the absolute value of the scaling (but misaligned because we weren't expecting this) I suppose the solution would be something like limit the padding to at most occupy perhaps half the space in any given column? 2/3? |
@alexcjohnson Should we give a warning ( |
Mmm yeah, good idea - |
Here is the codepen for the reported bug: https://codepen.io/rbakker/pen/gBjXde
The pen shows two plotly plots with Sankey diagram with the same data.
The only difference is that the first plot uses node.pad = 10, the second uses node.pad = 2.
In the first plot the nodes are not drawn at all.
The text was updated successfully, but these errors were encountered: