react-d3-graph icon indicating copy to clipboard operation
react-d3-graph copied to clipboard

How to apply different d3 layouts to Graph (Network, Heirarchy and Radial Views)

Open michaelbdavid opened this issue 4 years ago • 3 comments

Is there a way to apply different layouts to a graph. For example, If I wanted to give a user the option to switch between Network, Heirarchy and Radial Views?

It would be cool if there was a way that I could specify this layout and graph would just update.

michaelbdavid avatar Nov 10 '20 15:11 michaelbdavid

Right now, the only way to achieve that is by setting your own x, y coordinate values to construct the different kinds of layouts.

danielcaldas avatar Nov 17 '20 13:11 danielcaldas

Hey @danielcaldas , Thanks for the reply, do you know of any libraries that I could use that would take nodes, and edges and give by x, y with container size? Realize this is out of scope for react-d3-graph but thought you might have come across something like this.

Thanks again, Michael

michaelbdavid avatar Nov 17 '20 16:11 michaelbdavid

@Hey, @michaelbdavid, maybe something like this would do the trick?

danielcaldas avatar Nov 18 '20 10:11 danielcaldas