What layout is better to use to draw a flow chart with D3.js? D3.js is version 5.7.0.

use D3.js to draw flow chart with tree layout or force layout.
D3.js is version 5.7.0,
React is 16.0.0
the final effect is similar to the picture.
PS: canvas area initialization will have five nodes, start and end, and other three nodes. If the current node is selected, a node will be automatically generated after it is clicked on the menu bar button. If no node is selected, a node is generated by default before the end.

clipboard.png

problem description

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

topic description

sources of topics and their own ideas

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

problem description

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Jun.10,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3889a-2c137.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3889a-2c137.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?