如何控制Echarts中图谱渲染顺序,或者说让某个节点显示在上面。
"echarts": "^5.5.0",
series: [
{
type: 'graph',
zlevel: 10,
layout: 'force',
force: {
repulsion: 800, // 排斥力
gravity: 0.05,
edgeLength: [100, 300],
friction: 0.8,
layoutAnimation: true
},
draggable: true,
roam: true,
nodeScaleRatio: 0,
zoom: 1.4,
// center: [5.97, 9.71],
scaleLimit: { min: 0.8, max: 1.3 }, // 比例限制
label: {
normal: { show: true }
},
itemStyle: {
normal: {
borderColor: '#ffffff',
borderWidth: 5,
shadowBlur: 20,
shadowColor: '#ffffff',
color: '#001c43'
}
},
data: datas,
links: linkmes,
lineStyle: {
normal: {
opacity: 0.9,
width: 5,
curveness: 0
}
},
categories: [{ name: '0' }, { name: '1' }, { name: '2' }],
selectedMode: 'single',
select: {
label: {
backgroundColor: 'blue'
},
disabled: true
}
}
]
我尝试在数据加载完后,再添加一条数据,可他的位置还是随机的
只渲染一条数据的时候,他的位置也是随机的