Reputation: 10561
I just installed Neo4j and played with it in Neo4j Browser. My first HelloWord example is like this:
CREATE (database:Database {name:"Neo4j", id:"18"})-[r:SAYS]->(message:Message {name:"Hello World!"})
RETURN database, message, r
The visualization below uses the 'name' properties to display the node without the labels "Database" and "Message". Is it possible to display Database and Message as the labels of the nodes, and 'name:Neo4j' and "name:Hello World!" as the properties?
The following is an example from the neo4j book, and I want to see whether such a graph can be displayed in the Neo4j Browser. This is a standard labelled property graph visualization.
Upvotes: 0
Views: 601
Reputation: 141
You can use GRASS. Here is an example. With the caption you can edit whats written on the nodes. Just make a file with *.grass and drag it into the browser. You can decide wich attribute to display like this: "{ATTRIBUTE}"
. "caption":": My name is:{NAME}"
would result into a Node having this text on it: My name is: Yoshi. In the following i generally edit the nodes. with node.NODE
i only adjust the style for the nodes with the label NODE
.
"node":
{
"diameter":"50px",
"color":"#A5ABB6",
"border-color":"#9AA1AC",
"border-width":"2px",
"text-color-internal":"#FFFFFF",
"font-size":"12px"
},
"relationship":
{
"color":"#A5ABB6",
"shaft-width":"13px",
"font-size":"8px",
"padding":"3px",
"text-color-external":"#000000",
"text-color-internal":"#FFFFFF",
"caption":"<type>"
},
"node.NODE":
{
"color":"#FFD86E",
"border-color":"#EDBA39",
"text-color-internal":"#604A0E",
"caption":"{NODE_ELID}",
"diameter":"68px"
},
"relationship.CONNECTED_TO":
{
"color":"#FB95AF",
"border-color":"#E0849B",
"text-color-internal":"#FFFFFF",
"caption":"{SEGMENT_LENGTH}"
}
For your example you could use:
"node.MESSAGE": { "caption":"Message" }
Upvotes: 1