/x6

🌵JavaScript diagramming library.

Primary LanguageTypeScriptMIT LicenseMIT

x6

JavaScript diagramming library

MIT License language

build:? coverage:? issues:?

NPM Package NPM Downloads NPM Dependencies

Installation

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

# yarn
$ yarn add @antv/x6

Usage

<div id="container" style="width: 600px; height: 400px"></div>
import { Graph } from '@antv/x6'

const container = document.getElementById('container')
const graph = new Graph(container)
const node1 = graph.addNode({ data: 'Hello', x: 60, y: 60, width: 80, height: 30 })
const node2 = graph.addNode({ data: 'World', x: 240, y: 240, width: 80, height: 30 })
const edge = graph.addEdge({ data: 'x6', source: node1, target: node2 })

Development

$ yarn

# build
$ yarn build

# run test
$ yarn test

# run examples
$ cd expamples
$ yarn 
$ yarn start

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.