Skip to content
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

Adjusting Bundle's Length #84

Open
verina09 opened this issue Jun 12, 2019 · 4 comments
Open

Adjusting Bundle's Length #84

verina09 opened this issue Jun 12, 2019 · 4 comments

Comments

@verina09
Copy link

Hi, I am just wondering if it is possible to adjust the length of each bundle, as currently all bundles have the same length. I'm asking this because I'm wondering if I could use the length variable to represent duration of the process. Many thanks!

@ricklupton
Copy link
Owner

Hi, sounds like an interesting idea but I’m not sure exactly what you mean. Can you give a simple sketch or example that shows how this would work?

@verina09
Copy link
Author

verina09 commented Jun 14, 2019

Hi, thankyou for reply, below is the simple sketch I was thinking about, hope it clarifies and it makes sense (pardon the ugly stretch)

sampleBundleFloweaver 001

@alexbovet
Copy link

alexbovet commented Oct 23, 2020

I have more or less the same question: Is it possible to manually adjust the x position of nodes?

If I understand correctly, the x posiion of nodes is computed in d3-sankey-diagram, which has a nodePosition function. Is there a way to have this function read parameters from a sankey diagram made with floweaver?

@ricklupton
Copy link
Owner

Hi @verina09 (if you're still interested, sorry for the long delay!) and @alexbovet,

The best way of setting node positions at the moment would be to save the data from floweaver as JSON (using weave(...).to_json(), edit the JSON to add your desired node positions, and then render it using svg-sankey. Specifially setting the --position argument to indicate which node attributes to access to set the position.

At the moment it's all or nothing -- there's no easy way to set x-positions but keep the automatic y-positions.

It would be nice to have better integration for customising this within floweaver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants