jacomyal / sigma.js

A JavaScript library aimed at visualizing graphs of thousands of nodes and edges
https://www.sigmajs.org
MIT License
11.14k stars 1.59k forks source link

Using sigmajs for Bipartite graph visualization and highlighting shortest path between two nodes #826

Closed geekyminhaj closed 7 years ago

geekyminhaj commented 7 years ago

I have two use cases and trying to find a solution using sigma.js. I tried to find the solution for these two use cases everywhere on the internet but could not find any help. Any lead will be greatly appreciated: 1) Is it possible to use sigma.js for visualization of the Bipartite graph ?if yes how can we use sigma.js for it? 2) Is it possible to highlight the shortest path to a given node from the list of given nodes in the undirected graph? e.g. Node A is my target node and Nodes B, C and D are the source nodes from which I want to highlight the shortest path to node A in the visualization. Is this use-case is possible in using sigma.js directly or using any plugin?

Any lead will be greatly appreciated.

Yomguithereal commented 7 years ago
  1. Sure, you probably want to color both types of nodes differently.
  2. There is a A* plugin here: https://github.com/jacomyal/sigma.js/tree/master/plugins/sigma.pathfinding.astar
geekyminhaj commented 7 years ago

Thanks, @Yomguithereal for the quick help.