JSPM

@antv/layout

0.3.22-beta.7
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 101659
  • Score
    100M100P100Q165461F
  • License MIT

graph layout algorithm

Package Exports

  • @antv/layout
  • @antv/layout/dist/layout.min.js
  • @antv/layout/es/index.js
  • @antv/layout/es/layout/dagre
  • @antv/layout/es/layout/dagre.js
  • @antv/layout/lib
  • @antv/layout/lib/index.js
  • @antv/layout/lib/layout/circular
  • @antv/layout/lib/layout/circular.js
  • @antv/layout/lib/layout/comboForce
  • @antv/layout/lib/layout/comboForce.js
  • @antv/layout/lib/layout/concentric
  • @antv/layout/lib/layout/concentric.js
  • @antv/layout/lib/layout/dagre
  • @antv/layout/lib/layout/dagre.js
  • @antv/layout/lib/layout/force
  • @antv/layout/lib/layout/force/index.js
  • @antv/layout/lib/layout/forceAtlas2
  • @antv/layout/lib/layout/forceAtlas2/index.js
  • @antv/layout/lib/layout/fruchterman
  • @antv/layout/lib/layout/fruchterman.js
  • @antv/layout/lib/layout/gForce
  • @antv/layout/lib/layout/gForce.js
  • @antv/layout/lib/layout/grid
  • @antv/layout/lib/layout/grid.js
  • @antv/layout/lib/layout/layout
  • @antv/layout/lib/layout/layout.js
  • @antv/layout/lib/layout/mds
  • @antv/layout/lib/layout/mds.js
  • @antv/layout/lib/layout/radial
  • @antv/layout/lib/layout/radial/index.js
  • @antv/layout/lib/layout/random
  • @antv/layout/lib/layout/random.js
  • @antv/layout/lib/registy
  • @antv/layout/lib/registy/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@antv/layout) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.