cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to set a specific name to a CAPTION of a label

Hello Team,

May I know how to set a specific property to a CAPTION of a label in Neo4j-browser?

Thanks
Akshat

7 REPLIES 7

When viewing graph results, you should see label names just below the query part near the top of the result pane.

Click on the desired label whose caption you want to change. You should see additional controls at the bottom of the result pane related to display of nodes of that label. You can set the color and size of the node as well as select the caption to use.

Hi Andrew,

is it possible to set the caption in a cypher query?
Because I have millions of nodes and dont want to set the caption in browser by hand.

best regards

No, it's not currently possible, as there is no link between the visualizer and neo4j itself as far as what property to use in a visualization.

Note that you do not have to set the caption per node. In the visualization, you would select the label of interest, then select the property to use as a caption, and it would apply it for all nodes of that label in the result visualization.

By default neo4j browser seems to use the node "name" property for the caption if the property exists, otherwise it uses the node id for the caption.

Possibly this is a standard as I see the same behaviour is graphelion.

maybe you can do a set property in your cypher and set the name property to some other property of that node?

Seems like a waste of space that will clutter stuff just to specify the caption. It'd be nice if Cypher let you specify it as an option like CREATE (n:SomeLabel { foo: 'bar', baz: 'qux' }, { caption: 'baz' }).

I know this is a weird case, but seems like an optional settings object in Cypher would open lots of workarounds for these fringe cases.

You can tweak the caption with the style.grass file.

See:

which will contain things like this (below). The caption field is the one you want.

node.Category {
  color: #569480;
  border-color: #447666;
  text-color-internal: #FFFFFF;
  caption: "{Name}";
  diameter: 80px;
}

Hello Andrew,

Many thanks for the quick help. I can successfully change the things according to my need.

Best Regards
Akshat