Skip to content
♾ A Graph Visualization Framework in JavaScript
TypeScript Other
Branch: master
Clone or download
Latest commit 21f0c03 Jan 19, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github add .github Jun 6, 2018
.storybook fix: move types file path Jan 16, 2020
demos fix: delete pixelRatio for demos, docs, examples, and tests. add: cha… Jan 14, 2020
docs fix: render problem of custom node card demo. refactor: use type inst… Jan 16, 2020
examples fix: 修复contextmenu 和 packages Jan 16, 2020
site feat: G6 TS 环境搭建 Dec 2, 2019
src fix: update main path Jan 19, 2020
stories fix: update types path Jan 16, 2020
tests/unit feat: update g version Jan 16, 2020
.babelrc.js feat: supports use storybook manage demos Dec 31, 2019
.browserslistrc fix not support ie11 Oct 28, 2019
.editorconfig
.eslintignore Merge branch 'dev-3.3' into g6-dev-20191209 Jan 3, 2020
.eslintrc.js chore: update scaffold Jan 2, 2020
.fatherrc.js fix: update types path Jan 16, 2020
.gitignore refactor plugins and build Jan 3, 2020
.gitlab-ci.yml
.npmignore fix: G6 package delete public and .cache file Nov 17, 2019
.prettierignore G6 接入新官网 Nov 4, 2019
.prettierrc.js chore: update scaffold Jan 2, 2020
.travis.yml fix: add alias for webpack and fix pre commit hook and add ci Dec 23, 2019
CHANGELOG.md
CONTRIBUTING.md replace g2 to g6 for contributing.md Oct 25, 2019
CONTRIBUTING.zh-CN.md replace g2 to g6 for contributing.md Oct 25, 2019
LICENSE refactor 2.0 Jun 5, 2018
README-zh_CN.md fix: render problem of custom node card demo. refactor: use type inst… Jan 16, 2020
README.md
gatsby-browser.js fix: registerEdge without update problem. fix: webworker demo problem Jan 16, 2020
gatsby-config.js feat: G6 TS 环境搭建 Dec 2, 2019
global.d.ts fix: move types file path Jan 16, 2020
jest.config.js feat: destroy methods for graph Dec 19, 2019
package.json fix: update main path Jan 19, 2020
tsconfig.json fix: 修复contextmenu 和 packages Jan 16, 2020
webpack.config.js
webpack.dev.config.js feat: G6 TS 环境搭建 Dec 2, 2019

README.md

G6: A Graph Visualization Framework in JavaScript.

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.

You can’t perform that action at this time.