JavaScript diagramming library that uses SVG and HTML for rendering.
JavaScript diagramming library that uses SVG and HTML for rendering.
English | 简体中文
Official Documentation • Quick Start • Graph Examples • FAQ • Demo Template • Awesome X6
AntV X6 is a graph editing engine based on HTML and SVG, providing low-cost customization capabilities and out-of-the-box built-in extensions that make it easy to quickly build applications such as DAG diagrams, ER diagrams, flowcharts, lineage graphs, and more. We hope developers can use X6 to rapidly build various graph editing applications they need, making process relationship data controllable, interactive, and visualized.
As a professional graph editing and visualization engine, X6 has the following features:
event system that allows listening to any events occurring within the chart.10+ graph editing extensions, such as lasso selection, alignment lines, minimap, etc.MVC architecture, allowing users to focus more on data logic and business logic.You can install via package managers like NPM or Yarn.
# npm
$ npm install @antv/x6 --save
# yarn
$ yarn add @antv/x6After successful installation, you can import the Graph object using import.
import { Graph } from '@antv/x6'
const graph = new Graph({
container: document.getElementById('container'),
grid: true,
})
const source = graph.addNode({
x: 300,
y: 40,
width: 80,
height: 40,
label: 'Hello',
});
const target = graph.addNode({
x: 420,
y: 180,
width: 80,
height: 40,
label: 'World',
});
graph.addEdge({
source,
target,
});If everything goes smoothly, you will get a simple flowchart canvas as shown below.
# Install project dependencies and initialize build
$ pnpm install
# Start examples to view results
pnpm run start:examplesThank you to everyone who has contributed to this project and all supporters!
MIT.
2025 AntV OSCP Phase5 —— Season of X6
Registry.Router.presets.orth文档不对
路由算法能重写一个吗?或者找个第三方插件
链接桩绝对定位+曼哈顿路由连线出现异常
如何打造一个类似dify的注释组件?
orth路由模式下,segments 工具拖动手柄意外漂移,大概率线段路径错乱,重叠
3.x fromJSON后的节点会出现怪异情况
为什么使用 cdn 和使用 npm 包导入的行为会不同?
曲界线柱状图
这个库的3.x大版本还有规划迭代吗?看挺多问题还没解决