// initTopo 函数中
self.graph.get('canvas').set('localRefresh', false)
// 分组样式
comboStyle: {
default: {
fill: 'rgba(0,0,0,0)', // 填充颜色
stroke: '#00ffff', // 设置字体颜色
lineWidth: 2
},
hover: {
lineWidth: 3,
fill: 'rgba(0,0,0,0)'
},
selected: {
fill: 'rgba(0,0,0,0)',
stroke: '#00ffff'
}
},
// 分组标签样式
comboLabelCfg: {
position: 'top',
style: {
fontSize: 20,
fill: '#fff'
}
}
new G6.Graph({
renderer: "svg",
...
})
edge.style.endArrow = {
path: G6.Arrow.triangle(10, 20, 25),
d: 25,
fill: '#f00',
stroke: '#0f0',
opacity: 0.5,
lineWidth: 3,
}
const gatewayImg = require('@/gplot/assets/images/gateway.png') // 网闸
console.log(gatewayImg) // /static/img/gateway.f2da911.png