Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

G6

> 编程语言
Open source

♾ A Graph Visualization Framework in JavaScript.

12.2K stars0 likes2 views
WebsiteGitHub

About

♾ A Graph Visualization Framework in JavaScript.

English | 简体中文

G6: A Graph Visualization Framework in TypeScript

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.

✨ Features

G6, as a professional graph visualization engine, boasts the following features:

  • Rich Elements: It comes with a variety of built-in node, edge, and Combo UI elements with extensive style configurations, supports data callbacks, and has a flexible mechanism for extending custom elements.
  • Controllable Interactions: It includes more than 10 built-in interaction behaviors and offers a rich array of events, facilitating the expansion of custom interactive behaviors.
  • High-Performance Layout: The engine features more than 10 common graph layouts, some of which leverage GPU and Rust parallel computing for enhanced performance, and it supports custom layout development.
  • Convenient Plugins: Optimized built-in plugin functionality and performance, with flexible extensibility, making it easier to implement customized business capabilities.
  • Multiple Theme and Palettes: Provides two sets of built-in themes, light and dark, that integrate over 20 popular community color palettes based on the AntV new color scheme.
  • Multi-Environment Rendering: Harnessing the power of G, it supports rendering in Canvas, SVG, and WebGL, as well as server-side rendering with Node.js; it also offers plugin packages that provide powerful 3D rendering and spatial interactions based on WebGL.
  • React Ecosystem: By utilizing the React front-end ecosystem, it supports React nodes, significantly enriching the presentational styles of G6 nodes.

Getting Started

G6 is usually installed via a package manager such as npm or Yarn.

bash
$ npm install @antv/g6

The Graph object then can be imported from G6.

xml
javascript
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!

Ecosystem

  • Ant Design Charts: A React chart library based on G2, G6, X6, L7.
  • Graphin: A simple React wrapper based on G6, as well as an SDK for developing graph visualization applications.

For more ecosystem open-source projects, contributions are welcome. Please feel free to submit a PR for inclusion.

Contributing

This project exists thanks to all the people who contribute.

And thank you to all our backers!

  • Issue Reporting: If you encounter any issues with G6 during use, please feel free to submit an issue, along with the minimal sample code that can reproduce the problem.
  • Contribution Guide: Information on how to get involved in the development and contribution to G6.
  • Ideas Discussion: Discuss your ideas on GitHub Discussions or in the DingTalk group.

License

MIT.

Issues· 333 open

View all issuesOpen on GitHub
  • #7675

    AutoAdaptLabel.isFirstRender is never set to false, so getLabelElementsInView() has been unreachable since #6465

    waiting for maintainerUpdated Aug 9, 2026
  • #7671

    [Bug]: dagre布局,polyline类型的edge,endArrow方向反了

    waiting for maintainerUpdated Jul 24, 2026
  • #7648

    [Bug]: Chrome Crash When Rendering Many Nodes

    waiting for maintainerUpdated Jul 10, 2026
  • #7669

    [Bug]: 动画开销增加快于预期,在中小规模的图(300个节点)中就会导致3秒卡顿

    waiting for maintainerUpdated Jul 8, 2026
  • #7656

    [Bug]: 主题配置theme没有生效

    Updated Jun 17, 2026
  • #7668

    [Bug]:modes中添加‘’zoom-canvas‘,影响自定义节点内容滚动

    waiting for maintainerUpdated Jun 15, 2026
  • #7667

    [Bug]: G6 5.x版本,官网的minmap示例中,画布与minimap遮罩选中区域不一致

    waiting for maintainerUpdated Jun 12, 2026
  • #7665

    [Bug]: drag时drag的是锚点,鼠标松开后,拖拽事件无法结束,一直处于拖拽中

    waiting for maintainerUpdated Jun 9, 2026
  • #7664

    [Bug]: 大数据量绘制卡死前端问题,期待官方早日出解决方案

    performanceUpdated Jun 2, 2026
  • #7659

    [Bug]: G6 5.1.x 版本,官网的例子中 选中事件 在特定环境下 不会被触发

    waiting for maintainerUpdated Jun 1, 2026

> Tags

TypeScriptdata-visualizationgraphgraph-analyticsgraph-drawing

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言