As explained in Defining the graph structure, if the data store is hierarchical,
that is, if the childBinding or parentBinding attribute
is defined and the createLinksFromHierarchy attribute
is false, then Subgraph objects are created to represent the nested
hierarchy.
You can customize subgraphs like you customize nodes,
see Defining the nodes appearance. Instead of using the attributes nodeTemplate, nodeTemplateFunction, nodeStyle, nodeCreated,
and createNodeFunction, you must
use the equivalent set of attributes prefixed by
subgraph
: subgraphTemplate, subgraphTemplateFunction, subgraphStyle, subgraphCreated,
and createSubgraphFunction. Similarly,
the ibm_ilog.diagram.Node type in
the prototypes of the functions must be replaced by ibm_ilog.diagram.Subgraph.To customize subgraphs:
-
Use the attributes subgraphTemplate, subgraphTemplateFunction, subgraphStyle, subgraphCreated, and createSubgraphFunction in the same way you use the equivalent attributes to customize nodes, see Defining the nodes appearance.Use the type ibm_ilog.diagram.Subgraph in the prototypes of the functions similarly to ibm_ilog.diagram.Node for the nodes.