Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
X

X6

> 开发工具
Open source

JavaScript diagramming library that uses SVG and HTML for rendering.

6.6K stars0 likes2 views
WebsiteGitHub

About

JavaScript diagramming library that uses SVG and HTML for rendering.

English | 简体中文

X6: Graph Editing and Visualization Engine

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.

✨ Features

As a professional graph editing and visualization engine, X6 has the following features:

  • Highly Customizable: Supports customizing node styles and interactions using SVG / HTML / React / Vue / Angular, with a comprehensive event system that allows listening to any events occurring within the chart.
  • Out-of-the-Box: Built-in 10+ graph editing extensions, such as lasso selection, alignment lines, minimap, etc.
  • Data-Driven: Based on the MVC architecture, allowing users to focus more on data logic and business logic.
  • Server-Side Rendering: Supports server-side rendering with good browser compatibility.

Getting Started

You can install via package managers like NPM or Yarn.

bash
# npm
$ npm install @antv/x6 --save

# yarn
$ yarn add @antv/x6

After successful installation, you can import the Graph object using import.

xml
typescript
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.

‍ Local Development

bash
# Install project dependencies and initialize build
$ pnpm install

# Start examples to view results
pnpm run start:examples

Contribution

Thank you to everyone who has contributed to this project and all supporters!

  • Issue Feedback: If you encounter any issues with X6 during use, feel free to submit an Issue along with minimal reproducible code.
  • Contribution Guide: How to participate in the development and contribution of X6.
  • Discussion Ideas: Discuss on GitHub Discussion or DingTalk group.

License

MIT.

Issues· 148 open

View all issuesOpen on GitHub
  • #4772

    2025 AntV OSCP Phase5 —— Season of X6

    waiting for maintainerUpdated Sep 13, 2026
  • #5092

    Registry.Router.presets.orth文档不对

    waiting for maintainerUpdated Sep 8, 2026
  • #5091

    路由算法能重写一个吗?或者找个第三方插件

    feature 💡Updated Sep 5, 2026
  • #4194

    链接桩绝对定位+曼哈顿路由连线出现异常

    type: bug 缺陷Updated Aug 26, 2026
  • #4819

    如何打造一个类似dify的注释组件?

    waiting for maintainerUpdated Aug 21, 2026
  • #5061

    orth路由模式下,segments 工具拖动手柄意外漂移,大概率线段路径错乱,重叠

    waiting for maintainerUpdated Aug 17, 2026
  • #5066

    3.x fromJSON后的节点会出现怪异情况

    waiting for maintainerUpdated Aug 5, 2026
  • #5062

    为什么使用 cdn 和使用 npm 包导入的行为会不同?

    waiting for maintainerUpdated Aug 3, 2026
  • #5085

    曲界线柱状图

    feature 💡Updated Jul 22, 2026
  • #5081

    这个库的3.x大版本还有规划迭代吗?看挺多问题还没解决

    waiting for maintainerUpdated Jun 11, 2026

> Tags

TypeScriptantvdagdiagramdiagramming

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 23, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具