FlexTuts Library

Step 6: Placing nodes in the organigram

In this final step we will place every node in it's correct position, from the previous step we know that the width of the entire control depends on the number of nodes without children and the number of level, so, we can easily place the nodes without children, its position is given by the up left corner position (x, y).

For every node without children we have:

x = (n - 1) * nodeWidth + (n - 1) * hSpace + hSpace; // n = number of node without children
y = (l - 1) * nodeHeight + (l - 1) * vSpace + vSpace; // l = number of level

FlexTuts Library

As many other projects this is an Open Source Project under the MIT licence, you can have it for free, rewiew the source code, learn from it, change it to cover your needs, make copies of the files.

If you need a commercial version of this library with improved features, use the contact form and send me a message.

Regards.
Jorge Sánchez

Creating a simple Organigram control in Flex AS3

There are many solutions for this out there but I haven’t found any of them for free or as Open Source, so here we are going to learn how to make one from scratch. This version is written in Action Script 3, and it is part of the FlexTutsLibrary. If you want to know what the final product of this tutorial looks like, see it here: view Demo.

To get the FlexTutsLibrary for your projects go to the FlexTuts Library section and download the latest release.

Syndicate content