defaultEdge: {
type: 'polyline', 把这个设置成polyline是折线边
style: {
stroke: '#bfbfbf'
}
},
graph.node(node => {
const config = {
...JSON.parse(modelRect),
anchorPoints:[[0.5,1],[0.5,0]],在节点渲染里面设置是前一个节点和后一个连接点和接入点
label: node.label,
description : node.description
}
if (node.archive) {
config.preRect.fill = 'green'
}
return config
})
下面是g6的网址