Here i tried, but it doesn't work. I tried in labels as well as relationships also.
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: {
//"Character": "name",
"Banking": {
"caption": "name",
"size": "pagerank",
"community": "community",
//"sizeCypher": "MATCH (n) WHERE id(n) = {id} MATCH (n)-[r]-() RETURN sum(r.weight) AS c"
},
"Parameter": {
"thickness": "weight",
"caption": true,
"community": "Green",
},
"Method": {
"thickness": "weight",
"caption": true,
"community": "Blue",
},
"Request": {
"thickness": "weight",
"caption": true,
"community": "Red"
},
"Response": {
"thickness": "weight",
"caption": true,
"community": "Pink"
},
"Paths": {
"thickness": "weight",
"caption": true,
"community": "Purple"
},
"API": {
"thickness": "weight",
"caption": true,
"community": "Black"
},
"Department": {
"thickness": "weight",
"caption": true,
"community": "Yellow"
},
"System": {
"thickness": "weight",
"caption": true,
"community": "Red"
},
},
relationships: {
"Parameter": {
"thickness": "weight",
"caption": true,
"community": "green"
},
"Method": {
"thickness": "weight",
"caption": true,
"community": "Blue"
},
"Request": {
"thickness": "weight",
"caption": true,
"community": "Red"
},
"Response": {
"thickness": "weight",
"caption": true,
"community": "Red"
},
"Paths": {
"thickness": "weight",
"caption": true,
"community": "Red"
},
"API": {
"thickness": "weight",
"caption": true,
"community": "Red"
},
"Department": {
"thickness": "weight",
"caption": true,
"community": "Red"
},
"System": {
"thickness": "weight",
"caption": true,
"community": "Red"
},
},
initial_cypher:cypherQuery ,
arrows: true,
hierarchical_layout:true,
hierarchical_sort_method:"directed",
};
this.viz = new NeoVis.default(config);
this.viz.render();
console.log(this.viz);
output nodes are still multi-color.
I am sorry, but you will have to spoon-feed.