G6 v5 Graph Visualization
Overview
G6 v5 is AntV's graph visualization engine for network diagrams, tree graphs, and relationship visualizations. It uses a declarative configuration style where new Graph({...}) defines all nodes, edges, layouts, behaviors, and plugins in one constructor call.
CDN Usage
Content Retrieval Service
When using AntV G6 for data visualization, if you need to understand the concepts, usage, API, examples, and other aspects of G6 v5, you can use the provided context retrieval service. When using the skill, content is retrieved via an antv HTTP API server using GET requests.
- Host:
https://sive.antv.antgroup.com - Endpoint:
/api/v1/context/retrieve - Method:
GET - Parameters:
query,library,topK,content,maxTokens
Retrieve skills by query (hybrid search = FTS + vector + RRF fusion). Constraints docs are indexed as regular skill documents and will appear in search results naturally.
Critical Rules
MUST: Use new Graph({...}) — NOT v4 new G6.Graph()
MUST: All config in one constructor call, await graph.render()
MUST: Data format with id, source, target
MUST: Use style.labelText for labels — NOT label or labelCfg
MUST: nodeStrength must be ≥ 0 in force layout
MUST: force layout does NOT support preventOverlap / nodeSize
MUST: No Mode concept — behaviors are flat array
MUST: container is mandatory, default 'container'
Quick Reference
Dependencies
@antv/g6— G6 v5 graph visualization engine


