1

I need to work on drawing a hierarchical tree structure (HV-Drawing – Binary Tree) with orthogonal lines(straight rectangular connecting lines) between root and children ( like the following: http://lab.kapit.fr/display/visualizationlayouts/Hierarchical+Tree+layout ). I want to know if there are any open source examples of the algorithm of drawing trees like that so that I can implement the same algorithm in actionscript. Thanks Palash

user267530
  • 15
  • 5

2 Answers2

0

Here is my Python 3 realization: GitLab (this is internal project, GitLab registration required).

The program consists of only one file, so the installation is very simple (clone the repository and run hv-drawing.py with necessary arguments). Also the repository contents some examples of graphs for drawing.

The code is well-commented, so you can learn the algorithm on its realization.

VeLKerr
  • 2,995
  • 3
  • 24
  • 47
0

I did a C# version and put the code up on CodeProject. It's at:

http://www.codeproject.com/KB/WPF/LayeredTreeDraw.aspx

There's a generic part which gives the positions of all the nodes and a WPF specific implementation which actually draws everything using either straight lines or the orthogonal lines you're looking for.

Darrell Plank
  • 1,124
  • 7
  • 5