Here are the new extensions that are going to be published on visual studio gallery:
- GetOrgChart for ASP.NET MVC
- GetOrgChart for ASP.NET WebForms
- GetOrgChart Item and Progect Templates

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="/getorgchart-1.1/getorgchart.js"></script> <link href="/getorgchart-1.1/getorgchart.css" rel="stylesheet" />
$("#people").getOrgChart({ color: "blue", dataSource: [ { id: 1, parentId: null, Name: "Amber McKenzie"}, { id: 2, parentId: 1, Name: "Ava Field"}, { id: 3, parentId: 1, Name: "Evie Johnson"}] });
public JsonResult Read()
{
//Use OleDb to read the excel
string path = Server.MapPath(@"~/App_Data/People.xlsx");
string connString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties='Excel 8.0;HDR=Yes;'";
DataTable dt = new DataTable();
OleDbConnection conn = new OleDbConnection(connString);
OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM [People$]", conn);
adapter.Fill(dt);
//The following code will convert a data table to JSON format.
List> rows = new List>();
Dictionary row = null;
foreach (DataRow dr in dt.Rows)
{
row = new Dictionary();
foreach (DataColumn col in dt.Columns)
{
row.Add(col.ColumnName.Trim(), dr[col]);
}
rows.Add(row);
}
return Json(rows, JsonRequestBehavior.AllowGet);
}
var readUrl = "@Url.Action("Read")";
$.getJSON(readUrl, function (people) {
$('#people').getOrgChart({
theme: "helen",
color: "green",
primaryColumns: ["Name", "Title"],
imageColumn: "Image",
linkType: "M",
editable: false,
dataSource: people
});
});
Here is the result: