What options are available for the layout of directed or undirected graphs in .NET?

后端 未结 14 2051
伪装坚强ぢ
伪装坚强ぢ 2021-01-30 09:03

By graph here I mean something resembling these images:

相关标签:
14条回答
  • 2021-01-30 09:31

    Use QuickGraph to output Dot files for GraphViz. I did that in a recent project, and it seems to work quite well. Look here for sample code for parsing .plain files, or use my project here as a reference for just outputing .png images.

    0 讨论(0)
  • 2021-01-30 09:37

    Graphviz is still today, in my opinion, one of the best graph library there is. However, integrating it to .Net is a pain.

    It is possible to call the command line tool to generate a shape output based on your graph input, then you read the output and lay the elements on a custom control that displays whatever shapes graphviz has calculated. It's very hacky but it's the best way our team have found of integrating graphviz with .Net a few years ago.

    A better solution might exist today; at that time GLEE was still very embrionic and I haven't seen the progress Microsoft did since that time.

    0 讨论(0)
  • 2021-01-30 09:39

    Microsoft Research provides a tool called MSAGL (Automatic Graph Layout, previously called GLEE) for .NET.

    MSAGL is available here: http://research.microsoft.com/en-us/downloads/f1303e46-965f-401a-87c3-34e1331d32c5/default.aspx

    Disclaimer: I haven't used the tool so I don't know whether it is suitable for you (and neither do I know about the licensing conditions, seems it is for non-commercial applications only). But at least it looks interesting.

    0 讨论(0)
  • 2021-01-30 09:40

    I have been playing on GLEE/MSAGL and the actual layout per se is good enough for what I need however I'd like to be able to have more control over what is actually inside the nodes rather than just a single value like now.

    For example I'd like to have "details" that are hidden until I click on an expander in the node, or double click the node or hover with the mouse.

    Assuming GLEE cannot do this are there now any pure .NET solutions available that could do it?

    0 讨论(0)
  • 2021-01-30 09:41

    The boys at Mindscape have such a tool

    With the imaginative name WPF Flow Diagrams

    Also, check out Vertigo's Family.Show demo project, it has a simple form of this

    0 讨论(0)
  • 2021-01-30 09:48

    I have used NodeXL, http://www.codeplex.com/NodeXL, which is a .Net 3.5 library (but also an Excel add-on). NodeXl is developed by Microsoft Research and pretty neat: it has visualization algorithms and some metrics but it is still in its early stages of development. If you have are a seasoned .Net developer then I would definitely take a look at it.

    However, if you know Python then I would definitely recommend Networkx and its cousin pygraphviz which is an interface to Graphviz. I have used both and my productivity with Python / Networkx is way higher then when I was using NodeXL.

    GLEE is Microsoft's closed source library that you only can use for free in non-commercial software while NodeXL is Microsoft's way of open source but you can use it freely in a product you develop.

    0 讨论(0)
提交回复
热议问题