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-06-10 07:05:51
最后一次提交2025-04-11 08:15:41
發布數167
最新版本名稱5.0.48 (發布於 )
第一版名稱2.0.1 (發布於 2018-06-12 11:50:34)
用户参与
星數11.5k
關注者數213
派生數1.4k
提交數5.5k
已啟用問題?
問題數4701
打開的問題數207
拉請求數1820
打開的拉請求數8
關閉的拉請求數176
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?