Need to fit diagram inside Div tag

Hi,
I am using this library

I want to fit the regroupingTreeView digram inside div tag rather than adding horizontal line. You can check my below attached screenshot

I want to fit the diagram inside div rather than adding horizontal line Can you provide me how i can divide this graph??

“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?

That sounds like an unrelated problem. Could you please start a new forum topic and provide enough detail so that we can reproduce the problem?