I would like to create an organisational chart as shown here:
http://code.google.com/apis/visualization/documentation/gallery/orgchart.html
I can create the JSON google.visualization.DataTable string using the .NET Visualization helper library from here:
http://code.google.com/p/bortosky-google-visualization/
Unfortunately with this helper library it is not possible to display a custom format message like President or Vice President for each organisational chart member as the f: key is not generated by the helper library.
I was able to solve this question by writing a method that creates the organisational chart JSON from a C# DataTable:
As you see from the code above we need to have a DataTable with a column called Format in order to generate the f key in the JSON.
Please find below an example of a C# DataTable and the call to create the JSON for the google chart API:
Additional columns can be added after the Manager column and can be accessed in JavaScript in the select event of the google chart api.