@antv/layout
graph layout algorithm
Last updated 3 years ago by panyuqi .
MIT · Repository · Bugs · Original npm
$ 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 { GridLayout } 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 GridLayout({
  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.3.15-beta.0                                ...           beta (3 years ago)
  • 0.3.13                                ...           latest (3 years ago)

16 Versions

  • 0.3.13                                ...           3 years ago
  • 0.3.15-beta.0                                ...           3 years ago
  • 1.0.0-alpha.16                                ...           3 years ago
  • 0.3.16                                ...           3 years ago
  • 0.2.5                                ...           3 years ago
  • 0.3.0-beta.5                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.2                                ...           3 years ago
  • 0.2.0-beta.5                                ...           3 years ago
  • 0.1.31                                ...           4 years ago
  • 0.1.24                                ...           4 years ago
  • 0.1.19-beta.5                                ...           4 years ago
  • 0.1.22                                ...           4 years ago
  • 0.1.11                                ...           4 years ago
  • 0.1.7-beta.3                                ...           5 years ago
  • 0.1.6                                ...           5 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org