2

I'm trying to draw a directed graph with labels on edges. I'm using graph# (graphsharp) and quickgraph, and I saw an explanation in the forums about how to add labels (it is not supported by the library), but cannot manage to implement myself. If someone could provide a working example using these two libraries I would be very thankful.

Update: I'm now looking for something a little more complicated: My edges behave like nodes, they have connections to other nodes and have a name-tag. So they are like any other node, and when I draw the graph these edge-nodes must appear exactly in the middle of a certain connections. Any ideas?

Uri
  • 25,622
  • 10
  • 45
  • 72
  • Have you succeeded in drawing directed graph using GraphSharp with labeled vertices only? I am working on it right now and I haven't found the solution yet. – rivasket May 01 '12 at 18:39
  • @rivasket Sadly no. Gave up on that project for various reasons. Good luck to you – Uri May 03 '12 at 16:41

1 Answers1

0

Although it's not documented, QuickGraph supports output to other formats, like DGML. VS 2010 includes a very basic DGML viewer. It may be possible to output DGML so that the resulting graph has edge labels. However you will likely need to add support yourself.

Download the QuickGraph sources and play around with it. I'm a committer on the project, so if you figure it out let me know and we'll get your changes into the project.

RyanHennig
  • 1,072
  • 9
  • 12
  • Thanks for the answer. I'm now looking for something a little more complicated: My edges behave like nodes, they have connections to other nodes and have a name-tag, so they are like any other node, only they are snapped to certain connections, And I need to draw all this. Any ideas? – Uri Oct 01 '10 at 19:30
  • My experience with QuickGraph is mainly around using it for graph algorithms. I would encourage you to contribute to the Graph# library: either create some documentation if they already have what you need, or talk to them about how the feature can be added (by you or somebody else). Remember, use the force, read the source :-) – RyanHennig Oct 04 '10 at 19:36