How to force diagram to resize

Inside div a have my diagram canvas. When I changing dynamically size of div i would like to refresh (or repaint, I’am not sure) canvas size. It is possible to reach ?

Does this page help? http://gojs.net/latest/intro/resizing.html