views:

669

answers:

7

I'm trying to draw a graph on an ASP webpage. I'm hoping an API can be helpful, but so far I have not been able to find one.

The graph contains labeled nodes and unlabeled directional edges. The ideal output would be something like this.

Anybody know of anything pre-built than can help?

+3  A: 

I am not sure about ASP interface, but you may want to check out graphviz.

/Allan

Allan Wind
A: 

You might be able to pull this off with Google's Chart API. It is very easy to get started with.

Brian
This is not an option for this type of graph.
Kenn
charts and graphs are two different things.
xxxxxxx
+1  A: 

I would recommend zedgraph

Paul Dolphin
+4  A: 

Definitely graphviz. The image on the wikipedia link you are pointing at was made in graphviz. From its description page the graph description file looked like this:

graph untitled {
    graph[bgcolor="transparent"];
    node [fontname="Bitstream Vera Sans", fontsize="22.00", shape=circle, style="bold,filled" fillcolor=white];
    edge [style=bold];
    1;2;3;4;5;6;
    6 -- 4 -- 5 -- 1 -- 2 -- 3 -- 4;
    2 -- 5;
}

If that code were saved into a file input.dot, the command they would have used to actually generate the graph would probably have been:

neato -Tsvg input.dot > graph.svg
wxs
+1  A: 

GraphViz does a nice job for tiny graphs, but not for huge ones. If your graph is reasonlably large, try aiSee or have a look at the alternatives on this list.

RegDwight
A: 

You could use QuickGraph to easily model the graph programatically, then export it to GraphViz or GLEE, then render it to PNG.

Mauricio Scheffer
A: 

Well, here's another answer 2 years later. Protovis now does force-directed graph layouts rendered in browser: http://vis.stanford.edu/protovis/ex/force.html Might be easier if you can't install client-side software. Also it's fun and interactive!

wxs