The
Chart4.NET component is a .NET assembly that you can use in Desktop (winform) and ASP.NET (webform) projects.
Sample Downloads
Following samples describe how to describe the table tree (table hierarchy) and to load data into the orgchart control.
Winform Sample
Download DesignerSampleWebform(ASP.NET) Sample
Download OrganizationChart4TablesWebData Hierarchy
Following is a sample hierarchy of data:
Tables and Data Structure
Following is a list of tables to describe the above scenario. Please refer the samples above to see how to specify the table hierarchy to the chart control.
Output: Table Organization Chart
Following is the organization chart created from the above set of tables and data.
Applications
The above techhnique can be used for a database for any sort of application, where tables and data are linked through primary-key/foreign-key relationships. Please note the following things:
The explicit primary-key/foreign-key relationship described in database is not necessary. You have to specfy the relationship in code. An explicit database is not necessary. You are basically loading the chart from DataTables. It is not necessary to describe the leaf data always (if you have a lot of data). You can use the navigation fascility from the node-click (that will provide the selected table and id) to populate the details in a wider form. Refer DrillDownModeType for client-side and server-side navigation methods. The important thing is that you (and end-user) get a consolidated and quick way to work with the application database. Key methods used are HierarchyTable.Add() and HierarchyData.LoadFromTables(). Related Articles
How To Create Organization Chart from DatabaseDownload Samples
Other Sample Downloads
Download an appropriate sample here (no installation required): Sample DownloadsWeb Control Demo | Web Control Demo (Advanced) | Web Control Demo (Database)Library Downloads
Library (demo version) is included in Sample Downloads