How to add scrollbars to gojs diagram

Hi There,

I have created tree diagram using gojs and below is the output of it.
image
In the above image, you can see, when I set height and width to the div (div with myDiagram id) in pixels the diagram content inside is getting hidden and there isnt scroll bar coming up.

Is there a way to set scrollbar to the diagram? I want content inside to have both horizontal and vertical scrollbar automatically whenever needed.

Here is my code https://codepen.io/manshi44/pen/eYMgJxp?editors=1010
let me know if im doing some wrong configuration to the diagram.

You have set Diagram.allowHorizontalScroll and allowVerticalScroll to false, so of course there are no scrollbars.

Hi Walter
That was really quick response. Thank you so much.
And yes when set allowVerticalScroll to true, vertical scrollbar is coming. But allowHorizontalScroll when set to true, horizontal scroll is not coming up. You can check the same code pen link.

Why don’t you just set:

const FILLVIEWPORT = false;

What behaviors do you want? What behaviors don’t you want?

Thanks Walter,
Now I can see vertical and horizontal scroll bars.