Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-08-2022 06:54 PM
My neo4j version is 3.5.30, there are only 12 color for nodes in different labels.
But I have more than 12 nodes in different labels, I want to show each nodes in different color.
Are there any ideas to expend the number of color in neo4j browser?
03-15-2022 04:05 AM
You could add additional styling via :style
command or importing a .grass
file.
See here: css - Where can I find an overview of the syntax of the Neo4j GRASS language? - Stack Overflow
For example, if you want to add a background #0101FF
and a border color "#9AA1AC" to node with label "Test", #6DCE9E
to node with label "MySecondLabel2" and #00FF00
to relationship with type IS_RELATED_TO
,
you could execute this query:
:style {
"node.Test": {
"color": "#0101FF",
"border-color": "#9AA1AC"
},
"node.MySecondLabel2": {
"color": "#6DCE9E"
},
"relationship.IS_RELATED_TO": {
"color": "#00FF00"
}
}
or this query (without double-quotes and {}
wrapping the style):
:style
node.Test: {
color: #A5ABB6;
border-color: #9AA1AC;
}
node.MySecondLabel2 {
color: #6DCE9E
}
relationship.IS_RELATED_TO {
color: #00FF00
}
Alternatively, you can create a file style.grass
, with the same syntax as above (without :style
), and drag-and-drop it into your Neo4j Browser / Desktop window.
Unfortunately, I haven't found much documentation on grass syntax, other than the above link .
All the sessions of the conference are now available online