Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neo4j 2.0.1 Browser - Display Node Properties (In addition to ID property)

Tags:

neo4j

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

like image 738
user3303569 Avatar asked Feb 12 '14 21:02

user3303569


People also ask

How do I access Neo4j from my browser?

Neo4j Browser is the easiest way to access a Neo4j database. To establish a connection, you enter the DBMS URL, the name of the database you want to connect, and the user credentials. You can also use the :server command to manage the connection to Neo4j.

What are properties in Neo4j?

Properties Properties are key-value pairs that are used for storing data on nodes and relationships. The value part of a property: Can hold different data types, such as number , string , or boolean .

What features of Neo4j browser enables you to save Cypher scripts for use with different databases?

However, you can use Neo4j Browser Sync to save Cypher scripts from your Sandbox. We recommend you use the Neo4j Desktop or Neo4j Aura for a real development project. The Sandbox is intended as a temporary environment or for learning about the features of Neo4j as well as specific graph use-cases.


4 Answers

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

like image 147
Ken Papagno Avatar answered Oct 16 '22 05:10

Ken Papagno


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

like image 22
Michael Hunger Avatar answered Oct 16 '22 05:10

Michael Hunger


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

like image 22
Konza Avatar answered Oct 16 '22 07:10

Konza


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

like image 23
tstorms Avatar answered Oct 16 '22 06:10

tstorms