Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to illustrate multigraphs in Javascript? [closed]

This question is looking for a practical and easy way for drawing multigraphs using Javascript.

First of all look at this question. None of those libraries support Multigraphs (or Pseudographs ). I mean I can't generate graphs like this:

Some Multigraph

Is there any jQuery plugin (or javascript library) out there for this purpose ?

I thought i can use WolframAlpha's API and use its images, something like this:

enter image description here

but it have lots of problem:

  1. I can't move nodes or add remove edges interactively.

  2. Only 2000 API calls per month. Not enough.

  3. I can't produce large or intermediate graphs.

  4. They are really ugly!

Please help me if you know some javascript library in order to draw Multigraphs, or anyway to produce such graphs (something like Dracula Graph Library but with ability to draw Multigraphs).

like image 701
Michel Gokan Khan Avatar asked Nov 29 '11 09:11

Michel Gokan Khan


3 Answers

Cytoscape.JS supports multigraphs, is pure Javascript, and uses the new HTML 5 Canvas for performance. Its design intent is general purpose graph visualization/manipulation.

https://js.cytoscape.org/

like image 87
Developer Avatar answered Nov 15 '22 11:11

Developer


If you are allowed to use Google Charts API you may refer to this

http://code.google.com/apis/chart/image/docs/gallery/graphviz.html

Example:

https://chart.googleapis.com/chart?cht=gv&chl=graph{C_0--H_0[type=s];C_0--H_1[type=s];C_0--H_2[type=s];C_0--C_1[type=s];C_1--H_3[type=s];C_1--H_4[type=s];C_1--H_5[type=s]}

graph

like image 5
Prashant Bhate Avatar answered Nov 15 '22 12:11

Prashant Bhate


I'm affraid you will have to do some development yourself. Raphael.js is pretty capable in creating and manipulating svg - would be good starting point

like image 3
Konstantin Pribluda Avatar answered Nov 15 '22 13:11

Konstantin Pribluda