Core
The core owns a graph, its viewport and instance-wide operations.
The core (cy) is the graph, its stylesheet and its viewport. It owns
instance-wide data, events, loading, layouts, exports and renderer lifetime.
An application creates one core per independent graph/view. cy.clone() makes
a second model and renderer when the same graph should appear in another
container; it is not a second renderer attached to one mutable store.
#Function categories
- Initialisation and lifecycle — Construct, mount, inspect readiness and dispose of a core.
- Graph manipulation — Add, reconcile or progressively load graph data, and batch related writes.
- Accessing elements — Look up elements by identity, region, query object or predicate.
- Data and scratch — Keep serializable graph data separate from transient application scratch.
- Metadata and environment — Inspect core configuration, environment and graph metadata.
- Events — Bind core listeners or delegate to elements using predicates.
- Viewport manipulation — Read and change the view without changing model positions.
- Interaction controls — Control programmatic operations, user gestures and interaction defaults.
- Emphasis — Emphasize a neighbourhood through core-owned view state.
- Animation — Animate viewport channels and control running core animations.
- Layout — Create a whole-graph layout handle; run it explicitly.
- Style and legends — Apply a declarative stylesheet and inspect its legend.
- Export and snapshots — Export graph payloads or render a raster image.
- Independent views — Clone into an independent core with its own renderer and interaction state.
Links from earlier versions of this guide
Adding, removing and reconciling
cy.boxSelectionIncludesLabels()
cytoscape.toColumnarElements()