import { Graph } from '@antv/g6';
const graph = new Graph({
container: 'container',
data: { nodes: Array.from({ length: 20 }).map((_, i) => ({ id: `node${i}` })) },
behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],
plugins: [
{
type: 'minimap',
size: [240, 160],
},
],
node: {
palette: 'spectral',
},
layout: {
type: 'circular',
},
autoFit: 'view',
});
graph.render();