0

I’m pulling graph data from neo4j and was hoping to display my graphs in React Flow, however, I have not seen options for different auto layout styles. Most of the examples I have seen in React Flow have been coded in javascript and produce Tree style layouts. However, in other graph UI tools there are options for thing like: force, tree, circle, sphere, cluster, etc. I want ot do something like this rather than a tree layout.

enter image description here

I’m looking for an auto layout function that would look something like this which is called “force” in other tools.

How can this be done in React Flow?

Thanks.

spacedog
  • 446
  • 3
  • 13
  • There is no buil-in functionality for this, but you can implement it with d3-force library. There is pro example in reactflow docs: https://reactflow.dev/docs/examples/layout/force-layout/ but it's not hard to recreate it by yourself. – Patryk Uszyński Jun 01 '23 at 13:10

0 Answers0