要获得具有相同颜色的节点集群,我们需要运行此查询-
CALL algo.labelPropagation('cabinet_2','Parameter','privileges_2',
{ write:true,
partitionProperty:'community', weightProperty:'count'})
我也运行了-
CALL algo.labelPropagation(null,null,'OUTGOING',{write:true,
partitionProperty:'partition',
weightProperty:'count'})
现在,尽管运行此查询,但节点没有任何区别。 请检查-
请帮助。我想要均匀的颜色,如此处所示-
此外,我是否必须对所有节点运行Call algo .labelPropogation查询?
var cypherQuery = "MATCH (n)-[r]->(m) RETURN n,r,m;";
var config = {
container_id: "viz",
server_url: "bolt://localhost:11001/",
server_user: "neo4j",
server_password: "Virtuallib1",
labels: {
"ngoconnectionserviceimplhttpsoap11endpoint": {
"thickness": "weight",
"caption": true,
"community": "partition",
"sizeCypher": "MATCH (n) WHERE id(n) = {id} MATCH (n)-[r]-() RETURN sum(r.weight) AS c"
},
"ngoconnectionserviceimplhttpsoap12endpoint": {
"thickness": "weight",
"caption": true,
"community": "partition",
"sizeCypher": "MATCH (n) WHERE id(n) = {id} MATCH (n)-[r]-() RETURN sum(r.weight) AS c"
},
"connparams_2": {
"thickness": "weight",
"caption": true,
"community": "partition",
"sizeCypher": "MATCH (n) WHERE id(n) = {id} MATCH (n)-[r]-() RETURN sum(r.weight) AS c"
},
"connparams": {
"thickness": "weight",
"caption": true,
"community": "partition",
"sizeCypher": "MATCH (n) WHERE id(n) = {id} MATCH (n)-[r]-() RETURN sum(r.weight) AS c"
},
"System": {
"thickness": "weight",
"caption": true,
"community": "partition"
},
},
relationships: {
"Parameter": {
"thickness": "weight",
"caption": true,
"community": "partition",
"color":'red'
},
"Method": {
"thickness": "weight",
"caption": true,
"community": "Blue",
},
"System": {
"thickness": "weight",
"caption": true,
"community": "partition",
},
},
cluster_labels: {
"Parameter": "partition"
},
initial_cypher:cypherQuery ,
arrows: true,
hierarchical_layout:true,
hierarchical_sort_method:"directed",
};