G6 README

The project's README from github.com/antvis/G6. As one markdown file: README.md.

English | 简体中文

G6: A Graph Visualization Framework in TypeScript

antvis%2FG6 | Trendshift

npm Version Build Status codecov npm Download typescript npm License Ask DeepWiki

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:

🔨 Getting Started

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

$ npm install @antv/g6

The Graph object then can be imported from G6.

<div id="container"></div>
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

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! 🙏

Contribution Leaderboard

📄 License

MIT.

G6 (antvis/G6)

Searching Database…

12.3K ·GitHub
这是什么?G6 是一个面向网页的图可视化框架:一个用于绘制、布局、分析和交互关系数据(如网络图)的引擎,支持动画、主题和插件。
这是我加到自己应用里的库,还是一个现成的工具?它是一个框架,需要安装到你自己的 JavaScript 或 TypeScript 项目中,在其基础上搭建图可视化应用——不是独立的软件。
怎么把它加到项目里?用 npm 或 Yarn 安装,然后从 G6 导入 Graph 对象,把你的数据喂给它,屏幕上就会显示出图。
G6 免费吗?可以在商业项目里用吗?可以。它采用 MIT 许可证开源,可以免费使用、修改并用于商业产品。
Graphin 是什么?一个基于 G6 的简单 React 封装,也是用于开发图可视化应用的 SDK。它属于 G6 生态,和 Ant Design Charts 并列。
G6 里的 Combo 是什么?Combo 是和节点、边并列的一种内置界面元素,用来把相关的节点分成组,这样可以一起设置样式和操作这些群组。
What are similar projects?G2, sigma.js, cytoscape.js, pixijs, Chart.js, graph, nivo, rete
Creator
antvis
Size
81.5 MB
Stars
12.3K
Age
9y
Commits · 90 Days