@antv/graphlib / Exports / GraphViewOptions
Options to create a GraphView
| Name | Type |
|---|---|
N |
extends PlainObject |
E |
extends PlainObject |
• Optional cache: "none" | "auto" | "manual"
Cache mode of the GraphView. Defaults to 'none'.
-
none: Use no cache. Filters are applied when reading data. Fast to create but a bit slow to read data. -
auto: Automatically cache data when view created or graph changed. Fast to read data but takes time to build up cache. You should callstopAutoCache()to avoid unnecessary updates if the GraphView is no longer active. -
manualManage cache manually.clearCache()refreshCache()updateCache()might be useful.
• Optional edgeFilter: (edge: Edge<E>, source: Node<N>, target: Node<N>) => boolean
▸ (edge, source, target): boolean
| Name | Type |
|---|---|
edge |
Edge<E> |
source |
Node<N> |
target |
Node<N> |
boolean
• graph: Graph<N, E>
The original Graph
• Optional nodeFilter: (node: Node<N>) => boolean
▸ (node): boolean
| Name | Type |
|---|---|
node |
Node<N> |
boolean