| | | | Browse by category |
Question
How to perform graphlayout on subgraphs that are connected by intergraph links?
Answer
Most graph layouts do not take intergraph links into account. Intergraph links are taken into account:
- by
IlvLinkLayout
if theInterGraphLinksMode
is enabled. - since JViews 8.5 by
IlvHierarchicalLayout
if theRecursiveLayoutMode
is enabled. - since JViews 8.5 by
IlvTreeLayout
if theRecursiveLeafLayoutMode
is enabled.The tree layout however takes only tree links into account, i.e. not all intergraph links.
All other graph layouts would still layout the subgraphs as disconnected graphs, even though those subgraphs are connected by intergraph links.
The sample below demonstrates a workaround, which implements a special grapher adapter that replaces the intergraph links on the fly by normal links, and removes these replacement links after layout. In this case, graph layout would no longer consider those graphs as disconnected thanks to these temporary replacement links. The sample also shows how to use recursive multiple layout on nested graphers via IlvRecursiveMultipleLayout
API.
You can download the included sample of the attachment.