How-to: Organization Chart from Multiple Tables

Organization Chart from Multiple Linked Tables

Learn how to create comprehensive table hierarchies using the Chart4.NET Organization Chart Control.

Sample Downloads

The following samples demonstrate how to describe the table tree (table hierarchy) and load data into the org chart control.

Data Hierarchy

Following is a sample hierarchy of data:

Org Chart Data Hierarchy

Tables and Data Structure

Following is a list of tables to describe the above scenario. Please refer to the samples above to see how to specify the table hierarchy to the chart control.

Org Chart Table Structure

Output: Table Organization Chart

Following is the organization chart created from the above set of tables and data.

Org Chart Table Organization Chart

Applications

The above technique can be used for a database in any sort of application where tables and data are linked through primary-key/foreign-key relationships. Please note the following:

  • The explicit primary-key/foreign-key relationship described in the database is not strictly necessary. You have to specify the relationship in your code.
  • An explicit database is not necessary. You are basically loading the chart from standard DataTables.
  • It is not necessary to describe the leaf data always (if you have a lot of data). You can use the navigation facility from the node-click (that will provide the selected table and ID) to populate the details in a wider form. Refer to DrillDownModeType for client-side and server-side navigation methods.
  • The important thing is that you (and the end-user) get a consolidated and quick way to work with the application database.
  • Key methods used are HierarchyTable.Add() and HierarchyData.LoadFromTables().

Was this page helpful?
Thank you for your feedback!

Your input helps us improve our documentation.