magjac / d3-graphviz

Graphviz DOT rendering and animated transitions using D3
BSD 3-Clause "New" or "Revised" License
1.68k stars 103 forks source link

Calculate layout positions only without drawing #237

Closed klaraseitz closed 2 years ago

klaraseitz commented 2 years ago

I'd like to use my own visualization for dot files. Therefore, I am looking to only use graphviz to calculate the positions of the layout and return a dot string with positions.

I tried using graphviz().layout but this directly returns an svg

Is there a way to only access the dot string with positions of the calculated layout?

ghost commented 2 years ago

I don't think you want to use d3-graphviz for that case. You most likely want to use https://github.com/hpcc-systems/hpcc-js-wasm "only". What the wasm allows you is to layout to JSON. I can provide some more guidance after that is needed.

magjac commented 2 years ago

I agree with @TheKneupner.