neo4j-contrib / neovis.js

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

Show multiple relationships #209

Closed Aigul9 closed 3 years ago

Aigul9 commented 3 years ago

Is it possible to visualize multiple relationships? It returns only nodes while using the same query in the db gives another result. image image upd. I didn't figure out yet, but sometimes it does show multiple relations, but is there a way to assign them different colors?

thebestnom commented 3 years ago

Ahh, neo4j desktop automatically trying to get all relationships between nodes you returned (you can turn that off in the configuration) your cypher doesn't return the relationships (you don't give them names) Try changing -[:REL]-> to -[r: REL]->

Aigul9 commented 3 years ago

Thank you, it worked! Can i distinguish two different relationships except using a caption?

thebestnom commented 3 years ago

On 2.x you can use any edge configuration you want! https://visjs.github.io/vis-network/docs/network/edges.html My first instinct was adding a static color per relationship type