Open atarashansky opened 4 years ago
So I know this package hasn't been updated in a while, but I just wanted to recommend this PR - really useful and simple functionality (just give a value to each node and it will sort them into order - the values themselves are immaterial) for fixing the vertical order of nodes. I've found it particularly powerful if also fixing PosX when making repeatable figures for publications.
(Though installing it does not seem to work for me - I can install the package (using a zip of the repo and devtools::install_local ) which sets up all the javascript bits, but the main sankeyD3::sankeyNetwork function does not then recognise the NodePosY argument - so I had to directly source the sankeyNetwork.R script and utils.R script, unfortunately, but then it all works!)
It was not clear to me what form the
yOrderComparator
argument should take in pull request #16 so I added aNodePosY
argument tosankeyNetwork
to allow the user to directly specify the y position of nodes.