i intend to use go js as front-end dashboard elements/ graphs that show some data consider the following pictures
now what i need is to find out if it is possible to resize the diagram according to the size of div
i intend to use go js as front-end dashboard elements/ graphs that show some data consider the following pictures
That’s not “resizing” the diagram – that is “rescaling” the diagram.
If you want to do it once, call Diagram.zoomToFit.
If you want it to happen automatically just once, when a Model is loaded, set Diagram.initialAutoScale to go.Diagram.Uniform
.
If you want it to happen automatically whenever the contents of the diagram changes, the Diagram.documentBounds, set Diagram.autoScale to go.Diagram.Uniform
. This prevents the user from zooming in or out.