I know how to display the value of properties with text on the edges/nodes. But I want to know if the width/size of edges/nodes can vary according to the property value. For example, the larger the transaction, the thicker the edge is on the graph. The more amount of savings, the larger circle the node is. I know it may require normalization but I would like to know if it's possible at all. The default setting of nodes in the graph is all equal.
How to display edges/nodes in neo4j with width/size according to some specified property?
703 Views Asked by fchen92 At
2
There are 2 best solutions below
0
On
There is support for styling nodes and relationships in the browser, called GraSS: https://neo4j.com/docs/browser-manual/current/operations/browser-styling/
You could combine GraSS with different labels, but there is no support to evaluating label/relationship properties for sizes. You can only use properties in combination with caption
:style node.Account {
diameter: 10px;
caption: "{name} - {balance}"
}
relationship.TRANSACTION {
color: #F16667;
caption: "$ {amount}";
}
The following is not supported
:style relationship.TRANSACTION {
shaft-width: "{normalized_size}";
}
You cannot change the width/size of nodes or edges in Neo4j Browser at the moment. You will need to use other tools such as Neo4j Bloom, Neovis.js, or other custom visualization tools/libraries like Gephi, D3, etc..