neo4j-contrib / neovis.js

Neo4j + vis.js = neovis.js. Graph visualizations in the browser with data from Neo4j.
Apache License 2.0
1.59k stars 324 forks source link

assigning colors randomized to labels present in graph #293

Closed Niveydhithaa closed 1 year ago

Niveydhithaa commented 1 year ago

image Say I want this graph through neovis, i have a set of categories or node labels -> but through neovis i wish to see them with different colors, as in neo4j

My config: image

Niveydhithaa commented 1 year ago

[initial discussion at https://github.com/neo4j-contrib/neovis.js/issues/290

thebestnom commented 1 year ago

If you put the group to be also mapped by function (you commented that out) the color should be different for each label

thebestnom commented 1 year ago

(and remove the static)

thebestnom commented 1 year ago

Worst case scenario put color as function and use the label as seed to random color 😅 (but if the group is different vis automatically give different color to each one (unless color is specified)

Niveydhithaa commented 1 year ago

Agh. okay, sure. I'll try and let you know

Niveydhithaa commented 1 year ago

Thanks for the help @thebestnom !