g6/packages/site/docs/_apis
2023-08-31 11:12:13 +08:00
..
modules feat: legend (#4889) 2023-08-31 11:12:13 +08:00
.nojekyll feat: add 3d demo to site 2023-08-30 14:32:45 +08:00
modules.md Feat: Add API Docs (#4877) 2023-08-30 19:46:37 +08:00
README.md Feat: Add API Docs (#4877) 2023-08-30 19:46:37 +08:00

Overview / Modules

G6 API Core Modules

import { Graph, Util } from '@antv/g6';
const data = Util.mock(6).circle();

const graph = new Graph({
  container: 'container',
  width: 500,
  height: 500,
  data,
  layout: {
    type: 'grid',
  },
  plugins: [
    {
      key: 'minimap',
      type: 'minimap',
      size: [300, 200],
      mode: 'delegate',
      delegateStyle: {
        fill: 'red',
      },
      className: 'g6-minimap-2',
      viewportClassName: 'g6-minimap-viewport-2',
    },
  ],
});

const nodes = graph.getAllNodesData();
const nodes = graph.getAllNodesData();

graph.on('node:click', (e) => {});

Introduce

In the above code snippet, we may want to know more about what G6 has to offer, in which case we will need the G6 API documentation

What types, methods and classes are exported in the '@antv/g6' package?

What is Specification which in new Graph(Specification)

What are the detailed parameters of the plugins ?