♾ A Graph Visualization Framework in JavaScript.
English | 简体中文
Introduction • Examples • Quick Start • API
G6 is a graph visualization engine. It provides basic capabilities for graph visualization and analysis such as drawing, layout, analysis, interaction, animation, themes, and plugins. With G6, users can quickly build their own graph visualization and analysis applications, making relational data simple, transparent, and meaningful.
G6, as a professional graph visualization engine, boasts the following features:
G6 is usually installed via a package manager such as npm or Yarn.
$ npm install @antv/g6The Graph object then can be imported from G6.
import { Graph } from '@antv/g6';
// Get the Data.
const data = {
nodes: [
/* your nodes data */
],
edges: [
/* your edges data */
],
};
// Create the Graph instance.
const graph = new Graph({
container: 'container',
data,
node: {
palette: {
type: 'group',
field: 'cluster',
},
},
layout: {
type: 'force',
},
behaviors: ['drag-canvas', 'drag-node'],
});
// Render the Graph.
graph.render();All goes well, you can get the following lovely graph!
For more ecosystem open-source projects, contributions are welcome. Please feel free to submit a PR for inclusion.
This project exists thanks to all the people who contribute.
And thank you to all our backers!
MIT.
AutoAdaptLabel.isFirstRender is never set to false, so getLabelElementsInView() has been unreachable since #6465
[Bug]: dagre布局,polyline类型的edge,endArrow方向反了
[Bug]: Chrome Crash When Rendering Many Nodes
[Bug]: 动画开销增加快于预期,在中小规模的图(300个节点)中就会导致3秒卡顿
[Bug]: 主题配置theme没有生效
[Bug]:modes中添加‘’zoom-canvas‘,影响自定义节点内容滚动
[Bug]: G6 5.x版本,官网的minmap示例中,画布与minimap遮罩选中区域不一致
[Bug]: drag时drag的是锚点,鼠标松开后,拖拽事件无法结束,一直处于拖拽中
[Bug]: 大数据量绘制卡死前端问题,期待官方早日出解决方案
[Bug]: G6 5.1.x 版本,官网的例子中 选中事件 在特定环境下 不会被触发