“rather than adding horizontal line” – do you mean the horizontal scroll bar?
If you want the whole document (i.e. the Diagram.documentBounds) to fit in the viewport, you can either call CommandHandler.zoomToFit or Diagram.zoomToFit, or you can set Diagram.initialAutoScale or Diagram.autoScale to go.Diagram.Uniform.
So I have added initialAutoScale: go. Diagram. Uniform, and the disgram is fit in the viewport, but I am getting another issue when I am simply making changes than the graph is loading.
If I refresh the page or reload the page in that case, the graph is not showing, so I am not sure why I am getting this issue
Can you guide me?