antv/g6 流程布局圖



renderG6 = () => {
const {exerciseInfoTree} = this.props
let nodes = []
let edges = []
let widthX = 0
const data = {
nodes: nodes,
edges: edges,
};
const container = document.getElementById('container');
this.graph = new G6.Graph({
container: container,
width: widthX + 50,
height: exerciseInfoTree.length * 38,
modes: {
default: ['drag-node'],
},
defaultNode: {
size: [45, 25],
type: 'rect',
style: {
lineWidth: 1,
stroke: 'rgba(0, 0, 0, 0.5)',
fill: 'rgba(0, 0, 0, 0.07)',
radius: 2,
},
},
defaultEdge: {
type: 'polyline',
},
});
this.graph.cfg.data = data
this.graph.render()
}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM