代码拉取完成,页面将自动刷新
简体中文 | English
Graph Editing Engine Of AntV
JavaScript diagramming library that uses SVG and HTML for rendering
IE / Edge |
Firefox |
Chrome |
Safari |
---|---|---|---|
IE11, Edge | last 2 versions | last 2 versions | last 2 versions |
# npm
$ npm install @antv/x6 --save
# yarn
$ yarn add @antv/x6
<div id="container" style="width: 600px; height: 400px"></div>
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,
})
# install deps and build
$ pnpm install
# enter the specified project development and debugging
cd packages/x6
pnpm run build:watch
# start example to see the effect
cd examples/x6-example-features
pnpm run start
To become a contributor, please follow our contributing guide. If you are an active contributor, you can apply to be a outside collaborator.
The scripts and documentation in this project are released under the MIT License.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。