Render a graph to the requested format. json and dot are pure text transforms; svg/png/jpeg run the viz.js layout pipeline; html assembles the self-contained interactive document.
json
dot
svg
png
jpeg
html
the filtered, status-computed graph
the format plus layout options
injectable rendering boundaries and the HTML assets
a tagged RenderResult — text for json/dot/svg/html, binary for png/jpeg
RenderResult
text
binary
Error on an unknown format
(await renderGraph(graph, { format: 'dot' }, deps)).kind // => 'text' Copy
(await renderGraph(graph, { format: 'dot' }, deps)).kind // => 'text'
Render a graph to the requested format.
jsonanddotare pure text transforms;svg/png/jpegrun the viz.js layout pipeline;htmlassembles the self-contained interactive document.