console
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>The simplest demo</title>
</head>
<body>
<div id="container"></div>
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.g6-3.7.1/dist/g6.min.js">
</script>
<script>
const data = {
nodes: [
{
id: 'node1',
x: 100,
y: 200,
},
{
id: 'node2',
x: 300,
y: 200,
},
{
id: 'node3',
x: 400,
y: 400
}
],
edges: [
{
source: 'node1',
target: 'node2',
},
{
source: 'node3',
target: 'node1'
},
{
source: 'node2',
target: 'node3'
}
],
};
const graph = new G6.Graph({
container: 'container',
width: 800,
height: 500,
});
graph.data(data);
graph.render();
</script>
</body>
</html>