Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-07-2020 09:36 AM
I have 121 nodes. All are with same label. When i return a path, all comes with same color.
But what I want is, first node of the path should be green and last node should be red.
Please explain me how.
Thank you.
03-09-2020 05:05 AM
You can't specify that the first is always one color and the last is another. But you can specify colors for particular labels in the graph. See this screenshot:
You click on the label (like "Category") in the top bar, and then you can pick the color at the very bottom
03-09-2020 07:51 AM
The browser will only color nodes by Label. There's nothing saying you can't create a label specifically for that purpose.
// prep a label, making sure it no longer exists on any nodes
MATCH (a:RedColor)
REMOVE a:RedColor
// run your cypher command
MATCH p=(a:Thing)-[*]->(b:Thing)
WHERE length(p) = 3
// with the nodes you want to "recolor", and values you want to return
WITH p, b
// add that label to the nodes to be "recolored"
SET b :RedColor
RETURN p limit 10;
All the sessions of the conference are now available online