d3 Sankey - Is it possible to affect or decide the placement of nodes?
Asked Answered
B

1

6

I'm working with the Sankey plugin for d3.js. Is there a way to affect the automatic placement of the nodes?

If you compare the below 2 images.

Automatically generated Sankey Diagram: https://files.secureserver.net/0s3DEU5s3OZtqL

enter image description here

After I have manually re-arranged it: https://files.secureserver.net/0sYJF1w7f54wdF

enter image description here

You see that the nodes are aligned centered after each other which make it hard to use the diagram until you manually rearrange the nodes. Can I affect this flow somehow - or is it just the way it is?

By the way - Is there a way to specify that the text for the nodes should not be longer than the height of the nodes?

Bestialize answered 6/9, 2013 at 8:56 Comment(1)
Have you managed to find any solution to make the placement better?Watcher
S
1

According to the demo and its explanation, there is no way to affect the placement (and a brief look at the source confirms that). Similarly, there's no way to specify that the text for the nodes should not be longer than the height of the nodes.

Slatternly answered 6/9, 2013 at 9:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.