g6

A Graph Visualization Framework in JavaScript

Github stars Tracking Chart

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.

Main metrics

Overview
Name With Ownerantvis/G6
Primary LanguageTypeScript
Program languageJavaScript (Language Count: 5)
Platform
License:MIT License
所有者活动
Created At2017-02-13 10:00:43
Pushed At2025-04-22 08:07:36
Last Commit At2025-04-11 08:15:41
Release Count165
Last Release Name5.0.45 (Posted on )
First Release Name2.0.1 (Posted on 2018-06-12 11:50:34)
用户参与
Stargazers Count11.4k
Watchers Count212
Fork Count1.4k
Commits Count5.5k
Has Issues Enabled
Issues Count4636
Issue Open Count196
Pull Requests Count1771
Pull Requests Open Count4
Pull Requests Close Count170
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private