anvaka / ngraph

Beautiful Graphs
MIT License
1.41k stars 131 forks source link

Improvement: handling multiple links between nodes #33

Open gg4u opened 6 years ago

gg4u commented 6 years ago

Hi, I am looking at: https://bl.ocks.org/mattkohl/146d301c0fc20d89d85880df537de7b0

at the moment in ngraph is possibile to have two link between two nodes, with an id of the edge like "from.id-to.id" corresponding to the id of vertexes.

Have you considered the possibility to pass custom IDs , so that is possible to have multiple types of links?

anvaka commented 6 years ago

Hi Luigi, just wanted to acknowledge that I'm reading this, and thinking about it. I like the idea of custom ids a lot.

gg4u commented 6 years ago

Thank you, there are scenarios for traversing multiple types of viewpoints (aka type of links) that I would be indeed happy to work on and explore, for public audiences and open governance. If you are interested in, happy to share thoughts about data to consider in PVT!

gg4u commented 6 years ago

I would go for something like _id = <relationshipType>-<fromId>-<toId> not sure if a purely custom _id like _id = 'yesImACustomLink!' can be of actual utility like instead it is for nodes... Have not thought about a use case but to query links for relationshipType.