Multilinks in IBM ILOG JViews
Comment (1) Visits (2100)
Multilinks may look messy if each individual link takes a different path. Then the links also may produce plenty of crossings, waste lots of space and it is visually difficult to recognize them as multilinks. Hence it is desired to display them in a way so that they appear quasi parallel, sharing the same rough shape. This is called multilink bundling. I will explain in the following a couple of features that IBM ILOG JViews offers for multilink bundling.
Bundling of straight multilinks
If you have a bundle of straight links that have no bends, the individual links of the bundle differ only for the connection points at the nodes. Hence you need a link connector at the nodes that allows shifting connection points for individual links. In this case, I recommend the IlvC
By this, the IlvS
or specify in CSS
That's all what is needed to get nice bundles of straight multilinks. However, it works only for straight links, since as soon as a link has a bend, it is not anymore handled by the link bundle mode automatically. See the picture above, right.
Bundling of orthogonal multilinks
Orthogonal link usually need bend, since they consist of strictly horizontal or strictly vertical link segments. Hence, the link bundle mode of the links does not help here. In order to arrange the multilinks nicely, it is required that the bend are shifted in parallel. You can obtain this by using the short link layout (Ilv
or in CSS:
If the same shape for multiple links is disabled, the individual links of the bundle will take different paths. If it is enabled, they are displayed like a bundle. The link bundles mode allows to further specify the details, but my recommendation is always to use IMPR
Bundling using the IlvLinkBundle
The previous mechanisms kept the multilinks in the graph and only ensured that their routed paths are parallel. If you have only 2 nodes, but 1000 links between them, this might be a bit inefficient since the diagram has to handle 1002 individual objects. Hence, it is sometimes better to restructure the graph a bit, by using the IlvLinkBundle class. This class allows to represent a multilink bundle as one object. In the scenario mentioned above, you then don't need 1002 individual objects but only 3 objects: the two nodes and the IlvLinkBundle. The IlvLinkBundle is essentially a link whose drawing looks like multiple links. It has additional nice features, for instance you can collapse a bundle, then it looks like 1 link, or expand the bundle again, then it looks again like multiple links. Furthermore it allows hierarchical groupings: you can create an IlvLinkBundle containing 2 IlvLinkBundles of 2 links each. This is displayed on the right side (the blue lines are the links, the yellow margins indicate the grouping). The disadvantage of IlvLinkBundle in IBM ILOG JViews 8.6, however, is that there is no ready-to-use interactor for selecting each individual link inside the bundle (not the entire bundle). Also, you cannot specify IlvLinkBundle via CSS, while creating a link bundle in Java is fairly easy:
IlvLinkBundle linkBundle = new IlvLThe overview link is drawn when the link bundle is collapsed. The links that are added as sublinks are drawn when the link bundle is expanded. In this case, the optional link bundle frame is drawn around the sublinks. If you add bend points to the link bundle, then the individual bend points of the sublinks are calculated automatically in a way so that the link bundle always looks nice.
I have shown various possibilities how to deal with multilinks in JViews. For straight links, use the multilink bundle mode of IlvE