I am trying to work on swimlanes where i have multiple nodes in multiple swimlanes and nodes are connected across the lanes. No node in one lane is connected.
Another scenario, where i have multiple nodes in one or multiple lanes, with no links between any nodes.
In both the cases, nodes are aligned vertically like this:
Do you have a Group.layout for each lane? If so, what is it? The sample uses LayeredDigraphLayout, which is appropriate when almost all of the links are within the lane, not across lanes. (In a swimming pool you are supposed to stay within your lane.)
Instead of having each lane/Group have its own layout, you should have all of those Nodes and Links be laid out by a single layout. See for example Page Not Found -- Northwoods Software.
But my requirement is to have lanes aligned vertically and growing horizontally like this:
Could you please suggest how to achieve this and share some documents which can help me.
I have just started using GoJS, not very much familiar with go.js library usage.
Yes, i have checked that as well. But it didn’t help.
Could you please suggest which part of code in Swim Lanes is responsible adding nodes vertically in a lane (with or without links across lanes) like this :
It’s the LayeredDigraphLayout that is the Group.layout. When there are no links between the nodes, they all get laid out in a single layer. When the layout direction is horizontal, the layers are vertical.
Is there any way using which it is possible to have nodes in a grid layout format with multiple number of rows and columns within a lane, and,
Also, is it possible that number of rows and columns can be modified dynamically depending on the number of nodes within a lane?
Thanks @walter. I am able to achieve the some sort of layout as per my requirement by modifying the direction property of LayeredDigraphLayout.
But there is another problem which is troubling me. As you can see in the following diagram, links are merging/overlapping each other:
I want all the links to be visible separately without getting merged or overlapped with each other.
I have checked the links class, but couldn’t find any property which can provide the functionality to avoid links’ overlapping.
Set LayeredDigraphLayout.setsPortSpots to false and set in your node template(s) on your port object GraphObject.fromSpot and toSpot to go.Spot.AllSides.
Got it now, since portId was used in the nodeTemplate, it was behaving like a single port and not the whole node.
Once it is removed, i got the following:
Could you please suggest, how to increase the space between vertical links, currently they are getting overlapped like this (marked with red boxes and highlighted with blue):
AvoidsNodes routing does not let you control overlapping link segments. (The functionality only tries to have links avoid crossing over nodes, not other links.) Sorry.
You can however try to fix up the routing afterwards, based on whatever is desired in your particular app.