documentationfor yFiles for HTML 3.0.0.2

LayoutGraphContext

This class is used to provide additional data to the graph and its elements that can be utilized by layout algorithms during computation.

Inheritance Hierarchy
LayoutGraphContext

Remarks

Data is stored on the graph using unique lookup key instances, typically defined by layout algorithms. Client code or LayoutData<TNode,TEdge,TNodeLabel,TEdgeLabel> can supply additional data associated with a particular key. Layout algorithms can then retrieve this data using the keys and utilize it for computation.

Data can be added to the entire graph or to its individual elements, such as LayoutNodes, LayoutEdges, LayoutNodeLabels, and LayoutEdgeLabels. Adding data per element is facilitated by using IMapper<K,V>, ItemMapping<TItem,TValue>, or data getter. An ItemCollection<TItem> enables the definition of collections of elements. Additionally, shared information can be stored as a constant value for all elements of a certain type.

Data associated with a specific key can also be temporarily hidden or replaced. Replacing data is achieved by pushing a new layer onto the context, registering the new data with the same key, and subsequently removing the layer once the data is no longer needed.

This class cannot be instantiated

Type Details

yFiles module
algorithms

See Also

Properties

Methods