Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Be able to only view labels for terminal nodes in Sankey plot #913

Closed
tayabsoomro opened this issue Aug 20, 2018 · 4 comments
Closed

Be able to only view labels for terminal nodes in Sankey plot #913

tayabsoomro opened this issue Aug 20, 2018 · 4 comments

Comments

@tayabsoomro
Copy link
Contributor

Hi,
I am creating a Sankey plot (image below) and I was wondering if there is a way to make these branches farther apart from each other so that the labels are shown correctly?

Right now, it really hard to distinguish one from the other.

screen shot 2018-08-20 at 12 17 27 pm

I looked at the documentation for the layout prop, and I have tried to randomly give it values like, layout={...} where ... are different numbers, but I do not understand layout prop fully to be able to work with it. Any suggestions/ideas?

Thanks,
Tayab Soomro.

@mcnuttandrew
Copy link
Contributor

Have you tried providing variations on the align prop? You can give it one of 'justify', 'left', 'right', 'center'. You might also try increasing the nodeWidth and nodePadding to space stuff out more?

@tayabsoomro
Copy link
Contributor Author

tayabsoomro commented Aug 21, 2018

Okay, I was able to make the visualization look presentable by aligning it to the center. Would it be possible to be able to only show the labels for terminal nodes? I was able to achieve it by just doing name: '' for all nodes except the terminal, but I would like the names to appear when they hover over a certain node/link.

Thanks,
Tayab Soomro.

@mcnuttandrew
Copy link
Contributor

You totally can! See above PR.

@tayabsoomro
Copy link
Contributor Author

Thanks a lot!

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

No branches or pull requests

2 participants