r/reactjs • u/karimelghamry • Jul 27 '20
Show /r/reactjs GraphAV - A graph algorithms visualizer built using React and Typescript (links in comments)
27
u/columbusguy111 Jul 27 '20
Very cool. Would be nice if you could add an edge with click and drag.
9
u/karimelghamry Jul 27 '20
thank you for your feedback! this is going to be implemented as soon as we add touch screen support to the node drag and drop.
I'm glad you liked it :)
6
u/throwawayacc201711 Jul 27 '20
I think a cool feature you could add is an organize/set layout. This would auto reorganize the nodes to create a “pretty” view. So examples would be hierarchical, orthogonal, etc.
In case the use case isn’t clear, imagine you have 20, 50 or even 100 nodes. Rather than having the user always moving them manually, you just press a button and presto it’s organized
4
u/karimelghamry Jul 27 '20
noted! that is actually a pretty neat feature to have indeed. I will add it to the TODO list of the project and hopefully will be implemented soon.
Thank you so much for the feedback!
2
u/robotkutya87 Jul 28 '20
You guys taking contributions? Would love to work on this.
2
u/karimelghamry Jul 28 '20
we will for sure be looking for contributors in the near future. We first need to setup a proper guide on how to contribute to the project to synchronize code from all sides. stay tuned!
2
u/bamigolang Jul 27 '20
Great. Is the graph editor integrated or did you develop a custom library? I am currently searching for such a graph editor for a project of mine :)
1
u/karimelghamry Jul 27 '20
It is currently integrated as it's still in early development stage. there are still core features missing such as weighted edges and touch support. We want to focus on these features first before moving on. We will definitely consider your feedback in the near future!
thank you so much for the feedback!
2
2
2
u/bogdanbiv Jul 27 '20
From an end user viewpoint I would want to be able to select a node and drag an edge to another node.
I was looking what graph library you were using, I was surprised to find no graph libraries in dependencies. Not good or bad, it's a different approach, one that allows more options than I thought.
I was thinking of adding a graph editor myself. My use case was making an editable version of https://github.com/APIs-guru/graphql-voyager. I'm sure there are many other use cases for a graph editor.
Thank you for taking action of creating this project and for sharing.
1
u/karimelghamry Jul 28 '20
From an end user viewpoint I would want to be able to select a node and drag an edge to another node.
this a feature that we are considering to add in the near future.
I was looking what graph library you were using, I was surprised to find no graph libraries in dependencies. Not good or bad, it's a different approach, one that allows more options than I thought.
we opted in to make everything from scratch to be able to fully customize the UI/UX. It's definitely alot of work, but I think it's worth it.
Thank you for taking action of creating this project and for sharing.
I'm very glad you've liked the project! thank you for your support.
3
Jul 27 '20
Bro awesome 🔥 , i am cs student myself struggling with complex ds and algos .this would be really helpful for understanding.
1
1
u/ashleyjamesy Jul 27 '20
very cool, I'm just starting out and want to make something similar to this, your source will help a lot
1
1
u/mikemaya27 Jul 27 '20
Awesome! Great job, have you consider adding a more information about what it's going on each step? IMO once you know how the algorithm works it's obvious why it's rendering that way but if you're learning the algorithm, having more information of why an edge was picked might be useful.
2
u/karimelghamry Jul 27 '20
That's for sure a must have feature. It is scheduled to be implemented after adding core features such as weighted edges.
Your feedback is so much appreciated!
1
u/sxeli Jul 27 '20
Very cool! You might want to convert the paths into beziers for routing around the nodes or maybe have them show behind the nodes (different z axis). Depending on your use case, it could keep graphs easily understandable/ clutter-free when there are too many nodes
2
u/karimelghamry Jul 27 '20
thank you for your feedback!
will definitely take this into consideration in the following iterations.
1
1
u/cmpthepirate Jul 27 '20
Feckin sweet! I'm building a pretty similar thing myself at the mo, with Dijkstra's algorithm on the back end in Go to calculate the routes :)
1
1
1
2
u/RobinPH Jul 28 '20
I made something similar, but only supports Dijkstra, planning to add more algorithms tho. Also no animations.
1
u/flowsintomayhem Jul 29 '20
Very nice :) I wonder if you could add a way to put in your own traversal algorithm to execute across the nodes, e.g. a little code editor window showing example code for each of the existing algorithms and then being able to edit that. Would be a nice way to be able to play with implementing such things visually.
18
u/karimelghamry Jul 27 '20
Hey guys,
GraphAV is an open source project made to visualize graph algorithms on the web. You can check it out using the following links.
website: https://karimelghamry.github.io/GraphAV/
Github repo link: https://github.com/KarimElghamry/GraphAV
feedback is more than welcome!