Quick To Use

The usage of the network graph layout is very simple, just specify <Graphin layout={{type:"xxx"}} />. You can start with the following code ~

import React from 'react';
import Graphin, { Utils } from '@antv/graphin';
const data = Utils.mock(10)
.circle()
.graphin();
export default () => {
return <Graphin data={data} layout={{ type: 'grid' }}></Graphin>;
};

Layout Preview

The following are the 10 built-in network graph layouts of Graphin based on the G6 layout, sorted by the frequency of usage scenarios as follows.

Note ⚠️: The following data are all from the same data, so the difference between some layouts may not be so big. In a real business scenario, the effect of matching the data with a suitable layout will be obvious. At the same time, for the convenience of browsing, the zoom function of the canvas is cancelled. , You can click on the icon </> at the bottom right corner to expand and view the detailed code.

渐进力导
type:graphin-force
预设布局
type:preset
同心圆布局
type:concentric
辐射布局
type:radial
层次布局
type:dagre
环形布局
type:circular
D3力导
type:force
G6力导
type:gForce
降纬布局
type:mds
随机布局
type:random