当节点数量超过一定数量后,关联节点信息及线信息不展示
配置项如下
var nodeCount = 998;//可以展示节点信息及线上信息
var nodeCount2 = 999;//不可以展示节点信息及线上信息
var nodes = [];
for(var i=0;i<998;i++){
var category = 1;
var symbolSize = 10;
if(i%2 == 0){
category=0;
}
var node = {
category:category,
draggable:true,
id:i,
name:'node'+i,
symbolSize:symbolSize,
value:i
}
nodes.push(node);
}
var links = [];
for(var i=0;i<1000;i++){
var target = i+1;
if(i==9){
target = 0;
}
var link = {
relation:i,
source:i,
target:target,
emphasis:{
label:{
show:true,
position:'middle',
formatter:function(x){return x.data.relation}
}
}
}
links.push(link);
}
console.log("nodes");
console.log(nodes);
console.log("links");
console.log(links);
option = {
legend:[{
data:['测试1','测试2']
}],
color:["#8C0211","#F39501"],
series:[{
name:'demo',
type:'graph',
layout:'force',
data:nodes,
links:links,
categories:[{code:'1',name:"测试1"},{code:"2",name:"测试2"}],
roam:true,
focusNodeAdjacency:true,
label:{
position:'right'
},
force:{
repulsion:100
}
}]
};