Black Lives Matter. Please consider donating to Black Girls Code today.

Sankey and manual arrangement of the nodes along the y-axis

Hi there!
I am trying to optimize the distribution of the nodes along the y-axis. Since I need the nodes to be sorted in a specific way, I am manually defining the y-position. The problem is that I am not sure how to correctly do that. As a consequence, the boxes/nodes often overlap or are automatically moved somewhere else (when using the snap option). Could you please suggest a solution for that?
In order to compute correctly the y values - and avoid overlaps - I thought about taking into account the size of the boxes (in pixel?). Do you know a way to do that?

Does anyone know how the nodes are placed when setting arrangement = “snap”?

Thank you in advance!

1 Like

Along the same line - is there a way to identify the default “coordinates” at which the nodes are placed in a Sankey diagram?

I’m dynamically generating multiple Sankey diagrams and have a need to add annotations directly next to the nodes, but I haven’t found a good way to dynamically identify just “where” the nodes will land so I can specify that for the annotations.

Like @xanderwallace described, there also doesn’t seem to be a straightforward way to manually place the nodes and still have the diagram look nice.

Any thoughts out there?

Hi @toucanna.
Did you find a solution? I have been trying by playing with the y values. Unfortunately, no luck so far :confused: