Free C++ library for drawing flow diagrams or Directed graph?

Zhang Long picture Zhang Long · May 29, 2011 · Viewed 10.8k times · Source

I want to embed a flow diagram drawing canvas in my program. Users would possible to:

  • draw "nodes" (rectangle nodes is enough) and "edges" (preferable to be orthogonal) to connect "nodes";
  • use mouse to drag nodes for layout and resize rectangle;
  • select one or multiple nodes by mouse to delete, copy, paste etc.;
  • select one or multiple nodes by mouse to edit predefined properties (volume, temperature, pressure etc.) for them.;
  • change color (optional)
  • save/read data to/from files.

After drawing, the program only needs to get the connection logic (in data structure like Directed graph) and properties for further calculation.

Is there any free or open source C++ library to do this? (Not necessary for cross-platform, available in windows is enough.)

Answer

Sean picture Sean · Jun 3, 2011

I recently was looking in to this and came across a few other options, along with Graphviz:

http://igraph.sourceforge.net/screenshots.html

http://networkx.lanl.gov/gallery.html

http://gephi.org/screenshots/

I ended up using networkx. I'm going to be playing with Gephi shortly to see what kind of data I can load in to it.