如题,想做概念图,但是为什么节点的大小改变不了,求解答ww
series: [
{
// name: 'Node',
type: 'graph',
layout: 'force',
data: graph.nodes,
links: graph.links,
categories: graph.categories,
symbolSize: (value, params) => {
params.symbolSize = parseInt(0.01*value) + 1
console.log(params)
return params.symbolSize;
},
roam: true,
draggable: true,
autoCurveness: true,
// edgeSymbol: [, 'arrow'],
// edgeSymbolSize: [, 5],
curveness: 0.3,
label: {
normal: {
show: true,
textStyle: {}
}
},
edgeLabel: {
normal: {
show: true,
formatter: function (x) {
return x.data.value + ' ' + x.data.name;
},
}
},
scaleLimit: {
min: 0.4,
max: 2
},
lineStyle: {
color: 'source',
// curveness: 0.3,
},
emphasis: {
lineStyle: {
width: 10,
}
},
force: {
repulsion: 500,
edgeLength: [50, 100]
}
}
]
贴一下vc代码,应该能看更清楚点
那个回调函数不知道为什么没有用,网上也没有找到相关的问题www
数据改变之后要重新调用chart.setOption(options)