Skip to content

Latest commit

 

History

History
105 lines (61 loc) · 2.27 KB

GraphViewOptions.md

File metadata and controls

105 lines (61 loc) · 2.27 KB

@antv/graphlib / Exports / GraphViewOptions

Interface: GraphViewOptions<N, E>

Options to create a GraphView

Type parameters

Name Type
N extends PlainObject
E extends PlainObject

Table of contents

Properties

Properties

cache

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 call stopAutoCache() to avoid unnecessary updates if the GraphView is no longer active.

  • manual Manage cache manually. clearCache() refreshCache() updateCache() might be useful.

Defined in

src/types.ts:228


edgeFilter

Optional edgeFilter: (edge: Edge<E>, source: Node<N>, target: Node<N>) => boolean

Type declaration

▸ (edge, source, target): boolean

Parameters
Name Type
edge Edge<E>
source Node<N>
target Node<N>
Returns

boolean

Defined in

src/types.ts:214


graph

graph: Graph<N, E>

The original Graph

Defined in

src/types.ts:212


nodeFilter

Optional nodeFilter: (node: Node<N>) => boolean

Type declaration

▸ (node): boolean

Parameters
Name Type
node Node<N>
Returns

boolean

Defined in

src/types.ts:213