@antv/layout
graph layout algorithm
Last updated 4 hours ago by newbyvector .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @antv/layout 
SYNC missed versions from official npm registry.

About

Layout algorithms for AntV

Installation

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

# yarn
$ yarn add @antv/layout

Usage

import { Layout } from '@antv/layout'

const model = {
  nodes: [
    {
      id: 'node1',
      x: 0,
      y: 0,
    }, {
      id: 'node2',
      x: 20,
      y: 20,
    },
  ],
  edges: [
    {
      source: 'node1',
      target: 'node2',
    },
  ],
}

const gridLayout = new Layout({
  type: 'grid',
  width: 600,
  height: 400,
  rows: 4,
  cols: 4,
})

const newModel = gridLayout.layout(model)

Documentation

License

The scripts and documentation in this project are released under the MIT License.

Current Tags

  • 0.1.3                                ...           latest (4 hours ago)

19 Versions

  • 0.1.3                                ...           4 hours ago
  • 0.1.2                                ...           4 hours ago
  • 0.1.1                                ...           16 hours ago
  • 0.1.0                                ...           16 hours ago
  • 0.0.16                                ...           21 days ago
  • 0.0.15                                ...           21 days ago
  • 0.0.14                                ...           a month ago
  • 0.0.13                                ...           a month ago
  • 0.0.12                                ...           a month ago
  • 0.0.11                                ...           a month ago
  • 0.0.10                                ...           a month ago
  • 0.0.9                                ...           a month ago
  • 0.0.8                                ...           a month ago
  • 0.0.7                                ...           a month ago
  • 0.0.6                                ...           a month ago
  • 0.0.5                                ...           a month ago
  • 0.0.4                                ...           a month ago
  • 0.0.3                                ...           a month ago
  • 0.0.2                                ...           2 months ago

Copyright 2014 - 2017 © taobao.org |