SOURCE

console 命令行工具 X clear

                    
>
console
const data = {
  nodes: [{
    id: 'node1',
    x: 100,
    y: 200
 },{
    id: 'node2',
    x: 300,
    y: 200
 }],
  edges: [{
    id: 'edge1',
    target: 'node2',
    source: 'node1'
 }]
};
const editor = new G6Editor();
const toolBar = new G6Editor.Toolbar({
  graph: {
    container: 'toolBar',
    width: 500,
    height: 1000,
  }
});
const flow = new G6Editor.Flow({
    container: 'mountNode',
    width: 500,
    height: 500
});
editor.add(flow);
editor.add(toolBar);
flow.read(data);
<div>
  <div id="toolBar">
    
  </div>
  <div id="mountNode"></div>
</div>

本项目引用的自定义外部资源