Diagram size equal to Section size

How to make the diagram size (with blue border) equal to the section size (black dotted border).

Is this just an HTML question? Did you want to make the DIV holding the Diagram the same size as whatever your “Section” is?

Yes, exactly. I want diagram.div to have the same size as that of the section.

I have used this:

			    var divMyDiagram = myDiagram.div;
			    divMyDiagram.style.width = "100%";
			    divMyDiagram.style.height = "100%";
			    myDiagram.requestUpdate(); 

But, this is not giving expected results.

This is an HTML question, not a GoJS question. It’s hard for us to know why your DIV might be behaving one way or another since it depends on the structure of the HTML on the page.

height: 100% does not work on divs by default (see lots of StackOverflow questions explaining this). The selection box’s size my be ill-defined, or it may be invalid HTML to put a DIV inside of the element the is your selection box(?) in the first place.

Percentage (%) not working here, So i switched back to “px” only.

Thanks