g6

A Graph Visualization Framework in JavaScript

Github星跟踪图

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.

主要指标

概览
名称与所有者antvis/G6
主编程语言TypeScript
编程语言JavaScript (语言数: 5)
平台
许可证MIT License
所有者活动
创建于2017-02-13 10:00:43
推送于2025-04-22 08:07:36
最后一次提交2025-04-11 08:15:41
发布数165
最新版本名称5.0.45 (发布于 )
第一版名称2.0.1 (发布于 2018-06-12 11:50:34)
用户参与
星数11.4k
关注者数212
派生数1.4k
提交数5.5k
已启用问题?
问题数4636
打开的问题数196
拉请求数1771
打开的拉请求数4
关闭的拉请求数170
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?