GitHub - antvis/X6: 🚀 JavaScript diagramming library that uses SVG and HTML for rendering. (original) (raw)
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, })