How to scroll diagram programmatically?

Hello,

Is there way to scroll diagram horizontal or vertical from code ?

Basically, you want to set http://gojs.net/latest/api/symbols/Diagram.html#position

Normal scrolling you can accomplish by calling: http://gojs.net/latest/api/symbols/Diagram.html#scroll, which sets Diagram.position.

Depending on the reason for scrolling, you might instead want to call: http://gojs.net/latest/api/symbols/Diagram.html#scrollToRect or http://gojs.net/latest/api/symbols/Diagram.html#centerRect, which also set Diagram.position.