-
Notifications
You must be signed in to change notification settings - Fork 27
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
Helping make NodePosX work #18
Comments
One thing I have learned while using sankeyNetwork from netorkD3 is node orders (Y axis) is preserved when number of iterations =0. I tried your code with iterations = 0 and seems it preserve the specified NodePosX argument as well. |
I know I'm three years late but maybe this helps:
nodes <- data.frame(
name = c("Enrolled", "Opted-Out", "Invited", "Activated"),
xpos = c(0, 1, 2, 5)
)
links <- data.frame(
source = c(0, 0, 2, 1),
target = c(1, 2, 3, 3),
value = c(20, 80, 80, 20)
)
sankeyD3::sankeyNetwork(
Links = links,
Nodes = nodes,
Source = "source",
Target = "target",
Value = "value",
NodeID = "name",
fontSize = 12,
NodePosX = "xpos",
align = "none"
) Created on 2021-12-22 by the reprex package (v2.0.1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have been using the sankeyD3 package to create SankeyNetworks and the 'NodePosX' feature isn't working for me yet.
To help illustrate the similar problem that I am having, I have edited the example from akraemer007 that was posted here to include the X positions of the nodes (see below) but it's still not working in the way that he had originally wanted, with manual control over the x-position of the 'Opted-Out' node.
Can someone please help identify the issue that I'm missing?
Thank you
Nevil
The text was updated successfully, but these errors were encountered: