is there a simple function to link to the corresponding chapters on the same page when clicking on the node? I bet it's simple and I just didn't think the right way but after searching alot I'm super confused what to do.
If you take a look at the Class Hierarchy sample or the Euler Diagram sample, clicking (or double-clicking in the case of the Class Hierarchy sample) calls the window.open method. You can construct whatever URI you want, including using “#” tags or “?” queries.
If you define the click or doubleClick handler on the Node (i.e. at top-level in your node template), then the second argument to the handler will be the node itself. Let’s say you name that second argument “node”. Then “node.data” evaluates to the bound data, and then “node.data.color” evaluates to whatever property you want to refer to.
Oh, so you want to stay on the same page with the Diagram? Find the element you want and call Element.scrollIntoView on it. This has nothing to do with GoJS.