documentationfor yFiles for HTML 3.0.0.3

FilteredGraphWrapper

An IGraph that contains a live subgraph of another IGraph.

Inheritance Hierarchy
GraphWrapperBase
FilteredGraphWrapper
Implemented Interfaces

Remarks

FilteredGraphWrapper is a decorator for another IGraph instance and can be used to retain only a subset of nodes and edges of the original graph. The properties nodePredicate and edgePredicate control which nodes and edges are retained in the filtered graph. Edges adjacent to filtered nodes are also filtered automatically (as their source or target would not be in the graph anyway).

Using FilteredGraphWrapper is the recommended way to hide nodes and edges by including only those that satisfy the specified predicates.

Note that FilteredGraphWrapper has to listen to events raised by the wrapped graph to keep itself updated, so dispose should be called if this instance is not used anymore. Otherwise, the wrapped graph may be kept alive for longer than necessary.

Ports at IEdges (i.e. edge-to-edge connections) are not fully supported.

Related Programming Samples

Organization Chart
An interactive viewer for organization charts with adaptive styles and automatic layout.
Collapsible Trees
Shows interactive collapsing and expanding of subtrees of a graph.

Type Details

yFiles module
view

Constructors

Properties

Methods

Events