You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
rockSandy 561f416d6c feat: add weight field for dagre layout 1 day ago
.github chore: prettier all code 1 week ago
.storybook chore: prettier all code 1 week ago
demos chore: prettier all code 1 week ago
docs fix: line with control points bug. doc: draggable for custom node doc 1 week ago
examples fix: line with control points bug. doc: draggable for custom node doc 1 week ago
site chore: prettier all code 1 week ago
src feat: add weight field for dagre layout 1 day ago
stories fix: dragging bug on minimap with a graph whose bbox is nagtive; fix: null matrix bug, create a unit matrix for null. fix: delete unnecessary console.log 3 days ago
tests/unit fix: enhance coverage 3 days ago
.babelrc.js chore: prettier all code 1 week ago
.browserslistrc fix not support ie11 3 months ago
.editorconfig refactor 2.0 1 year ago
.eslintignore Merge branch 'dev-3.3' into g6-dev-20191209 1 month ago
.eslintrc.js chore: prettier all code 1 week ago
.fatherrc.js fix: update types path 1 month ago
.gitignore refactor plugins and build 1 month ago
.gitlab-ci.yml chore: prettier all code 1 week ago
.npmignore fix: G6 package delete public and .cache file 3 months ago
.prettierignore chore: prettier all code 1 week ago
.prettierrc.js chore: update scaffold 1 month ago
.travis.yml chore: prettier all code 1 week ago
CHANGELOG.md fix: 3.3.4 is not published successfully 3 days ago
CNAME Create CNAME 1 week ago
CONTRIBUTING.md chore: prettier all code 1 week ago
CONTRIBUTING.zh-CN.md chore: prettier all code 1 week ago
LICENSE refactor 2.0 1 year ago
README-zh_CN.md chore: prettier all code 1 week ago
README.md chore: prettier all code 1 week ago
gatsby-browser.js chore: prettier all code 1 week ago
gatsby-config.js chore: prettier all code 1 week ago
global.d.ts chore: prettier all code 1 week ago
jest.config.js chore: prettier all code 1 week ago
package.json fix: 3.3.4 is not published successfully 3 days ago
tsconfig.json chore: prettier all code 1 week ago
webpack.config.js chore: prettier all code 1 week ago
webpack.dev.config.js chore: prettier all code 1 week ago

README.md

G6: A Graph Visualization Framework in TypeScript.

Coverage Status npm package NPM downloads Percentage of issues still open

中文 README

G6 is a graph visualization framework which provides a set of basic mechanisms, including rendering, layout, interaction, animation, analysis, and other auxiliary tools. Developers are able to build graph visualization analysis applications or graph visualization modeling applications easily. For more details, please see our doc.

Installation

$ npm install @antv/g6

Usage

import G6 from '@antv/g6';

const data = {
  nodes: [
    {
      id: 'node1',
      x: 100,
      y: 200,
    },
    {
      id: 'node2',
      x: 300,
      y: 200,
    },
  ],
  edges: [
    {
      target: 'node2',
      source: 'node1',
    },
  ],
};
const graph = new G6.Graph({
  container: 'mountNode',
  width: 500,
  height: 500,
  defaultNode: {
    type: 'circle',
    style: {
      fill: '#40a9ff',
      stroke: '#096dd9',
    },
  },
  nodeStateStyles: {
    hover: {
      lineWidth: 3,
    },
    select: {
      lineWidth: 5,
    },
  },
});
graph.data(data);
graph.render();

Development

$ npm install

# run test case
$ npm run test-live

# build watching file changes and run demos
$ npm run dev

How to Contribute

Please let us know how can we help. Do check out issues for bug reports or suggestions first.

To become a contributor, please follow our contributing guide.

License

MIT license.