11
votes

I am new to Neo4j. I am using v2.0.1. By default the browser application's stream (output) section only displays the ID properties of the nodes in the graph db. I have added several nodes with additional properties and relationships. When the graph is displayed in the stream window I only see default ID inside of the node pictures. When I click on the node a popup will show all my properties.

I would like to know if there is a configuration or style setting to cause a more useful property to be displayed so that the visible graph's nodes can be seen in a more useful way in the Neo4j browser.

thanks

4
By default, nodes only have an ID. You could write code to add nodes with properties, or write cypher statements. I suggest you read up on Neo4j and come back to SO when you have more concrete questions.tstorms
My nodes do have other properties. I have read up on neo4j and the documentation does suggest I could go to SO if i had questions. Sorry if they are not concrete enough. But basically when I stream my graph a see a nice picture of all the nodes and labels, but the only visible text in the node circle is the id. So wanted to know if there was a way to display something in addition or instead of the ID.user3303569
Ok, now I understand your question, see anwser below. You might want to consider improving your question so I can upvote again.tstorms
Please raise also a github issue (github.com/neo4j/neo4j/issues) to ask for displaying arbitrary amounts of properties and or id's.Michael Hunger

4 Answers

30
votes

While the accepted answer is correct, it doesn't show how to do it.

Since Neo4j Browser version v2.0.1, you can click on the label name at the top of the graph, options for size, color, and caption of the nodes appear at the bottom of the graph. Change the caption option to select a different property to display in the graph.

Here's a screenshot taken from Neo4j Browser v4.0.3.

enter image description here

12
votes

Currently you can only display node-property OR node-id as caption, use the popup dialog that shows when you click on a node or relationship.

The styling is configured per Label type and stored as a graph style sheet (GRASS) in your browsers local storage. You can also download these files to edit them and drag to upload them again.

enter image description here

3
votes

The question is asked for version 2.0.1 But this may help who uses a later version. For 2.2.5 You can download the grass file from the Favorites tab.

Download the existing grass file. Change the property 'caption' for your respective label

eg: Change

caption: '{name}'; to  caption: '{title}';

Drop the .grass file again to upload it and your changes will be reflected

2
votes

You can show different properties of the nodes. You should do the following (at least in Neo4j 1.9.x):

  • Click on "Style" in the upper right corner
  • Click on "New Profile"
  • Change label to e.g. "{name}" to show the name property
  • Save!

This is what the label formatting looks like:

enter image description here