Is the same sort of thing also possible with Dagre-D3?
I have been searching around the Internet in the hopes of finding a way to render a Dagre chart into a <div> element within a Bootstrap row / column so that the graph produced fits the available view ā but with no success. In all the examples Iām finding, the Dagre graph seems to decide for itself how big or small it wants to be. Some allow user controls that would zoom out to a specific size, but this is not ideal.
You can add a scale command to the transform attribute of the svg element using d3; try replacing these lines in the main cell of the āHello, Dagre!ā notebook:
Thank you @bgchen. That did the trick! My previous attempts to adjust the scale only seemed to be affecting the viewport (with the underlying chart remaining a constant size). Thanks for showing how to make the chart itself responsive!!