series: [
{
type: 'graph',
layout: 'force',
force: {
repulsion: 1200,
edgeLength: [10, 250],
},
roam: true,
label: {
normal: {
show: true,
},
},
data: this.datas,
links: this.linkmes,
lineStyle: {
normal: {
opacity: 0.9,
width: 5,
curveness: 0,
},
},
categories: [
{
name: '0',
},
{
name: '1',
},
{
name: '2',
},
],
edgeLabel: {
normal: {
textStyle: {
fontSize: 12,
},
show: true, // 是否显示节点关系值。
formatter: function (x) {
return x.data.value;
},
},
},
},
],
看他的说明是 趋近于 谁 ,他就用谁的长度 。 并不是设置了 就会按照数组顺序 设置长度