In case you have to do something like this in your code base, d3-hierarchy is gold.
Particularly this digraph() example: https://observablehq.com/@d3/visiting-a-d3-hierarchy.
With a bit of modification away from the GraphViz format, the result fits straight into one of the many graph component visualization libraries like react-flow.
Particularly this digraph() example: https://observablehq.com/@d3/visiting-a-d3-hierarchy. With a bit of modification away from the GraphViz format, the result fits straight into one of the many graph component visualization libraries like react-flow.