Hi,
I have a huge linkDatatArray (at least 2000 links including the tree node-child links) and NodeDataArray (atleast 500 nodes). As a result after new go.GraphLinksModel(nodeDataArray, linkDataArray), the diagram rendering is taking a lot of time owing to huge data. Is there any way of incremental loading of diagram so that entire loading thing can be smooth?
Also, We want to put a loading indicator on the diagram during the diagram loading. Do we have anything of that sort in GoJS?
For the size diagram that you talk about, 500 nodes and 2000 links, there should only be a problem if you are using LayeredDigraphLayout. If you are, that would not be a problem if we were using Java or .NET, but alas we have to use JavaScript when running in the browser. Are you using LayeredDigraphLayout? If so, how is your layout declared?
The diagram rendering takes 10-15 seconds. To give you relative picture, a diagram with two groups having tree structure and not more than 50 nodes and 100 links renders in a second or two. I am attaching a picture of the diagram to highlight how big it can get to take 10-15 seconds to render.
Disabling the animation has made the diagram rendering a little faster. However, I am facing one issue after disabling the animation
Diagram.animationManager.isEnabled = false;
As you can see in the picture, sometimes the diagram just doesn’t render. It gets stuck there as shown in picture. Now any change in the diagram (like zoom up down or inspect the element) renders the whole diagram. Any work around for this?
Is your Diagram in a tab? You may need to call myDiagram.requestUpdate() once you’re certain that the Div which contains the diagram has finished resizing (which may mean, the first time a tab has been activated).
FYI, Diagram.delayInitialization just causes “initialization” events of a Diagram (that one would normally get after replacing its Diagram.model) to happen again after updating the diagram.