SimpleChart (Org Chart WebPart) For SharePoint V2 – Now With Active Directory

I had some time over my lunch break today to put in a lot of fixes, code improvements, and new features. In no particular order of importance, there were three big things done:

Code Improvements I added improved exception handling, principally for resolving particular Types of exceptions, avoiding the use of a catch all Exception type. Beyond that, bloat reduction and reuse in terms of static method extraction, general refactoring, etc.


Exceedingly generic methods are used for everything non-specific to the gathering of the org chart data, such as major rendering methods since values in a DataTable (according to Google Visualization API specifications) are really the only thing changing.

General Fixes With The Last Version People were getting an ArgumentException bubble up in the last version that occurred on particular SharePoint patch levels. This has been mended in this version. It was my fault; I only had one platform to test with at the time because I wrote the first version over a lunch break at a client. But hey, it was labeled in the versioning output as a checked/debug build. :)

Active Directory Integration Yea! This version offers a toggling in the WebPart properties allowing a user to specify which mode they want to run SimpleChart in, either SharePointListMode or ActiveDirectoryMode. Each of these requires the hydration of their relevant properties, i.e. SharePointListMode requires the appropriate SharePoint List and Column Values, and ActiveDirectoryMode requires knowing which domain to query against. I added the Group Restriction option as a property because just laying out a domain in an org chart is frankly ludicrous. For any reasonably sized organization that would hardly be useful. However, it is prevalent within orthodox organizations to have Active Directory groups that are representative of divisions or other logical groupings within a company so this seemed like the most practical approach.

So, for those that like exhaustive illustrations before they download something, here is the WebPart in action.

Firstly, let’s start using SharePoint lists as a datasource follows the same pattern that is detailed in the first version of this WebPart here. That post has the solution install instructions so I am not going to rehash that.

When you first add the WebPart, the default mode it will function in is SharePointListMode. You will be informed that the required properties for the WebPart to function have not been adequately provided.


So you have to go fill these in! For this exercise I am using the SharePoint List Template (.stp) as detailed in the last version post as a datasource since it already has the relevant values for testing. When you open the properties, make sure you got the right version deployed by examining the versioning editor part located at the top of pane. Your version should be **.


Going off that same template, im going to make a new list off it:



Then fill in all the relevant properties for normal functioning based on the list data source. Same as last version, nothing fancy here. Remember to put the list name in too even though the below is simply showing the column hydration for brevity reasons.


When completed, you will see the org chart rendered! You just made art. Kinda.


Now it’s time to demonstrate the Active Directory integration. Firstly, you have to examine the new properties that allow the org chart to render out correctly.

  1. Specifies the rendering mode, whether you want the org chart to target either a SharePoint list or an Active Directory data source.
  2. This is still the list to use when in SharePointListMode.
  3. The domain to query into when using Active Directory mode.
  4. The name of the group to restrict the org chart to. This can be a division, grouping, anything really. This allows several org charts to be tailored to specific divisional taxonomy’s rather than making a master domain org chart that provides literally zero value. Unless you have like 5 people in your company.


Firstly, change the rendering mode to use ActiveDirectoryMode.


Now fill in the remainder of the properties based on your environment.


The group you choose is pretty flexible. Since I am using the Microsoft provided VM I am actually going to change “Guests” t0  “Litware Contractors”. That only has two people so should cultivate a nominal display.


Now, mapping the name in the WebPart properties:


 And now displaying the sexiness that is esoteric business material, the resulting org chart:


And that’s it! The WebPart is free, but any backlinks or examples of your use, even in the comments, is always neat because it equates to my satisfaction as a developer.


Let me know if you have problems in the comments :)


83 thoughts on “SimpleChart (Org Chart WebPart) For SharePoint V2 – Now With Active Directory”

  1. Great! Installed without a problem. Active Directory mode is nice, and you are correct, the group restriction option is crucial.

  2. This is a fantastic addition! Could you take it a step further and pull some standard fields from the AD profile of the users, like what is done in list mode? The username of jdoe or jsmith isn’t as useful as the name and number. =D

    Thanks a ton for making this and keep up the good work!

  3. Good idea! I believe I will extend the mapping to the AD org chart generation, and implement a search feature as well.

  4. +1 on the column mapping. It would be nice if you got the exact same org chart regardless of the mode that you are using to promote conformity.

    The search would be nice too, but not nearly as nice as having the above :)

  5. Do you need to have SP2 for MOSS in order for the web part to work? I have SP2 on my UAT envrionment and it works but not on my PROD.

  6. It shouldn’t be service pack dependent anymore, I removed all the binding references.

    What is the error you are getting on your prod environment?

  7. I have deployed the solution and it shows up in the solution management and it shows that it is deployed to all site collections but when I go into the sites the web part does not show up as an option.

  8. @ Kevin:

    I see, you have activated the Feature? The Feature contains the modules (the .webpart file) that when activated are added into the gallery.

    Worse comes to worse, you can just “new” it up once deployed. Just go to your WP gallery, hit “New”, checkbox box and populate the SimpleChart assembly.

  9. Hi Adam not sure why it was not showing up but I have gone in and forced it from the Web Part gallery. Thanks for your help on this one. Another quick question is there anyway to create your own custom list and use those fields instead of the template? I have tried but I have gotten errors from the custom lists that I have created. What essentially we want is an URL field for their MySites and do you know any reason why the country shows up twice?

  10. You should be able to use any fields you want, but some are specialized according to the Google API stuff. Oddly enough, I believe that if you input a US state as a piece of the DataTable passed in, it assumes US and tacks that on the end, which isn’t the case when using other countries. I think that I will have to either drop the country field, or think of another approach to toggle based on the values in the DataTable.

    Long and short of it is you should be able to use whatever data you want in the display. I thought about integrating MySites as a seperate element on it. Do you think this would be a good feature?

  11. Sorry for the bother. I have installed and everything seems to have gone smoothly until I try to link it to a imported list. It seems that no matter what I put in the “List to Use” box, all I get is “Please Add Items To The Org Chart list” on the web part itself. I can leave it blank, fill it with garbage, or use a valid existing list name… always the same results. Any ideas? I’m probably missing something ever so rediculous, but I’m starting to lose my mind at this point.

    Thanks in advance for any help you can offer.

  12. Not a problem. Part of releasing the software is committing yourself to supporting it :)

    When linking it to a list, are you filling in the column values in the WebPart properties?

  13. Hi again, sorry for the delay in responding, but I was trying to troubleshoot a bit before I sent along more info. It looks like when I fill in the column values in the WebPart properties (Column Configuration), the values that I enter must match the headings exactly (eg. for Employee ID I must enter “Employee ID”, Employee Name I must enter “Employee Name”, etc. all the way down the line). If I deviate and use the column name that exists in the sharepoint list (eg. insted of Manager ID I used Supervisor ID in the list column heading, I get the message Please Add Items To The Org Chart list again.

    I know I must be doing something wrong, but, for the life of me, I do not have a clue what that would be.

    Thanks again for your help.

  14. additionally, the Employee Country field duplicates as in your example above. Ideally I would be able to map my fields rather than have to use only those specified in the properties window. Not sure if I can do that.

  15. Adam, the install.bat file runs just fine, indicating success at each point. However, in the end nothing appears in the GAC or bin or Features node of the hive. No surprise that I then have no OrgChart feature to activate.

    Any ideas?

  16. I figured out what I needed to do to install the OrgChart solution.

    I looked at Gary LaPointe’s SharePoint Automation, where he shows the sequence of STSADM commands he uses for installation (his utilities had installed fine on my system). Most significantly, there was a -deploysolution command after the -addsolution command. So, I added this to your install.bat:

    stsadm.exe -o deploysolution -name arb.SharePoint.SimpleChart.wsp -immediate -allowgacdeployment -allcontenturls

    Worked fine.

  17. Almost done with it. I am trying to get it so it can work in a mixed mode fashion, meaning hybrid data from both AD and a list with toggable options of what should be overriden.

  18. Same problem like other: Always the error “Please add items to the Org Chart List” in ListMode.
    I try to use an existing Contact-list. Added necessary columns (like Manager ID) and filled in the corresponding fieldnames into the configuration of the WebPart. What is wrong?

  19. Does this work in WSS 3.0? there is no mention of what version this webpart works with. All it says is SharePoint. Is this only for MOSS as it doesn’t work with WSS.

  20. I am using WSS 3.0 with SP2, but I find no mention here about what versions of SharePoint this webpart is for. There are references only to MOSS in the comments but I am still puzzled. I run the install with no problem, but the webpart doesn’t show up anywhere.

  21. I have the same problem, I have WSS 3.0 also. It work with the AD but the not DataSource and cna’t use another list.

    Adam wath is the solution for that?

    Tanks for your time bro!

  22. Same problem as many are facing “Please Add Items To The Org Chart list”. Please help what could be the reason. All columns and even list name is same. Waiting for solution.

  23. Ok but I try created a list using your template provided in last post but not work. The .spt file upload good in the template library but not work… I dont know… is possible that not work in a WSS 3.0 spanish version…???


  24. This has the potential to be a really great webpart. You have done a great job with this.

    Now, for the part where the user wants more than you have offered. ;-)

    1) I love the tie-in to AD, but it just isn’t useful for us at this time. The problem is that it only pulls back the Account name. If we could select which AD fields to display, then I might be able to use this.

    2) It would also be nice to have some control over the depth of the chart. Our AD is fairly granular, and it looks like the chart only goes one level deep.

    3) This is probably not a major issue, but it seems that you can only have one instance of the webpart per page. If you try to create 2 separate charts, they both seem to error out.

    Again, thanks for doing such a great job with this so far!

  25. Thanks Mark. I always like getting more requirements, so no worries :)

    1) Toggling the fields is in the next version for AD.

    2) Yeah, it restricts to groups already though. What other restrictions would you find useful?

    3) 100% honest I haven’t tried running the WebPart with multiple instances going. What error is thrown if I may ask?

  26. Hello, great web part but as per usual my HR department want it with bells on!.

    we have a scenario where there are gaps in the hierarchy i.e. where we have an administrator and manager but no supervisor on one side of the org chart and have managers and supervisors on the other side, this however means that the admin position is at the same level as the supervisors on the org chart (If that makes sense). can you extend the connecting lines so the admin positions is below the level of the supervisors position but still connect to the manager?

  27. Hi
    great web part, but i can’t make it work !
    i test AD, i have only the domain name on the screen.
    I have a sharepoint list with all employee of my company, but the webpart say “add items to the org data base”.
    I create a database based on the example and i have the same message.
    What make i false ?

  28. I am having the same problem as many are facing Please Add Items To The Org Chart list. I am using the list that I downloaded from the site with no changes and still getting the error. How should the list name and column name be entered in the column configuration section?

  29. okay i found, in france we use the symbol ‘ in some case. And org char don’t like this !
    i delete all ‘ in my database and it’s ok but some word don”t tell anything without this character.
    Thank you for your good application.

  30. You are awesome!! This webpart is the one which we were looking for.
    I was thinking if there is way to add a Image thumb nail for every employee in this web part

  31. For people having trouble with the “Please Add Items To The Org Chart list” error message, try the following: Name your list “Org Chart Data Source”; in the field for the source in the web part panel, enter Org Chart Data Source–not the path.

  32. I’m trying to use the Active Directory Mode and I get this error:

    Your AD DS Datasource Appears To Have Insufficient Data To Render A Chart.

    Thank you for your help.

  33. Dear adam,

    congratulation for this nice tool.
    I used to ntigrate it in SP 2010 foundation.

    I got an Error:

    General Error : Cannot perform ‘=’ operation on System.Int32 and System.String.

    Do you have an idea how to handle this?

    kind regards

  34. Hi, I have installed this on WSS 3.0 on Windows 2008 Server, using the sharepoint list option. I’ve instaled the list template and have configured the webpart. I am getting no errors, but the page takes about 1 minute to load, and when it does it is blank. I was getting the “Pleas add items to the org chart list” error but since I followed the instauctions here that has gone away. But I’m still getting the blank page. It’s got the title Ok but just no chart. Any ideas what I could be doing wrong.Love this by the way, will amke a hughe difference to my project.

  35. Hi,

    it’s WSS, so do you measn which version of MOSS? WSS 3.0, don’t know if there is a 2007/2010 version, I think there’s just Windows Sharepoint Services 3.0. Does the webpart work on WSS?



  36. Hi,

    Ran into the common problem of “add items to org chart list”. I imagine that Patrick tried to answer that question, but I don’t quite understand what he means by saying “You have to choose an ID and an lookup to the ID of the Manager ID”. I read all the discussion posts here and on the old page, did not find a clear and concise solution… or any solution. Downloaded Adam’s custom list, triple-checked the correctness of input fields in the webpart and in the list… Still missing something.

  37. When I run the above install, I end up with a “ChartPart 2.0 for SharePoint” web part by Wictor Wilén, not the web part described above.

  38. Can this web part be used with 2010? When I try to select it I get an error message saying that iot isn’t a valid web part.

  39. I download the file and try to import it and it does not show. I tried to shoehorn it in and get this:

    The file you imported is not valid. Verify that the file is a Web Part description file (*.webpart or *.dwp) and that it contains well-formed XML.

  40. Great webpart, works wonderfully once you figure out the tricks with it, but the higher up’s have a problem with the formatting. They want the title to be on top and larger, followed by the person, and the rest they don’t care about. I’ve switched the name field to be rich text so it can be formatted a little, but if I use the name field for the position and the title field for the name, the name ends up in parenthesis. I know you don’t like extra unused fields, but if there was a way to reassign every slot, including the title, to a different field name, that would help.

    And they mentioned the box sizing. For some items it’s really narrow, putting line breaks at every space, and for others it’s padded a lot.

  41. Great Application

    I am have trouble getting it to work though, I get Parts.

    I am trying to integrate with AD as I had no luck with lists.

    I can set the Domain to “APS.local” (internal)
    I can set the Restrict to AD Group to “APS Solutions Engineering”

    I am however not getting all the user in the group and they are not reporting under their manager. Any assistance would be greatly appreciated.



  42. Is it right to assume that everyone having the “Please Add Items To The Org Chart list” is using WSS 3.0 and has anyone with WSS 3.0 actually got this to work?
    Like others in this thread I am experiencing the Please Add Items To The Org Chart list error and no matter how much troubleshooting or value changing I attempt it wont correct.
    Is there a fix or is this web part exclusive to MOSS?

  43. This webpart is not working in Sharepoint Foundation 2010, are there any way to make it work?
    I try change the installation path of the solution to the sharepint 2010 folder, but i get one error ‘Access denied’ in that folder, but i have total permision in this folder, maybe this webpart can´t work in Sharepoint Foundation 2010?

  44. I am getting no errors, but the page takes about 1 minute to load, and when it does it is blank.
    pleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeease heeeeeeeeeeeeeeeeeeeelp

  45. Very nice Job! I have filled the data list and everything works just fine, except that, I have not fund grouping possibility. Namely I suggest to add column Department to the data list, what would group employees together, if they are in the same department. In my opinion employees from the same department should be shown on the drawing inside new box which would use new third color and where at the top would be shown the name of department from data source list. At the moment employees are spread out on the drawing even if they are from the same department. I think this is only serious lack at your script.

  46. I only get the domain name to show up in the web part. I have left the “List To Use” blank but have added Active DirectoryMode. Now for the domain do I need to at the end of the domain for this to work?


  47. It’s easy to setup and used.
    Is it possible to select what field to be shown. Some information might not want to be shown and it causes the box to be too empty. This will made the SimpleChart more flexible.

  48. Hi Adam,

    Thanks for this great contribution – how about posting the source code so other community members can extend the functionality and pass it on?


  49. I have tried this out in SharePoint 2010 and it does work. Only problem is that the names have to match exactly.

    Also tried integrating with SharePoint but get the error message Your AD DS Datasource Appears To Have Insufficient Data To Render A Chart.

    We really need a peep at the source code so we can understand what needs to be fixed in AD, etc Adam.


  50. For those that have that problem of Please Add Items To The Org Chart list, make sure the column name you use is the internal name that SharePoint is using for the webpart. I had that problem before because I renamed Title to EmployeeName, and used EmployeeName as the webpart column setting. I instead entered Title for Employee Name in the webpart and it worked. Also, once you create a column you are stuck with that name, so if you rename the column, SharePoint still stores the column as the original name. To see what name SharePoint is using for the column, go to the list setting and click on a column, look at the url, there should be Field=ColumnName. That ColumnName is what you need to put in the webpart configuration.

    Hope this help.


  51. Does this work as a Sandboxed solution? I tried deploying it at Site collection level, though solution gets deployed and feature gets activated… it throws error when adding web part…Is it possible to develop a Sandboxed version…?

  52. I had trouble getting the WebPart to appear in the gallary in Sharepoint 2007 SP2 but found that te following line of code did the trick;

    “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe” -o deploysolution -name arb.SharePoint.SimpleChart.wsp -immediate -url http://[SITE URL HERE] -allowgacdeployment

    Also, am I the only one finding that my AntiVirus solution is going berserk blocking malicious sites on this page?

  53. I struggled with the “Please Add Items to the Org Chart” message. I made all my fields in the custom list a single line of text and it worked! I initally had the Superior ID and the Employee ID as numbers and when I changed those to single line of text it populated the Org Chart. Now the issue is that the web part is non-secure and our SharePoint is secure, so you get the Only Secure Content is Displayed. Once you allow it, life is good until you refresh or leave the page and come back to it. We are running Windows 2008 R2 and SharePoint 2010 on VM’s. Any suggestions on how to run the web part securely?

  54. It seems if you change the Employee Name to Title and Apply and then Change it Back to Employee Name it works! How mad is that!

  55. Even i am also getting error “Please Add Items To The Org Chart list”

    i am using SharePoint foundation 2010.

    i am able to deploy the web part without any error also given all the configuration parameter as per given but still getting the same error every time.

    Kindly suggest how to resolve the issue.

  56. Hie very nice work Adam! Lovely webpart.

    Would you be so kind as to share the source code with us?

    Maybe drop it on GitHub and we can open source it and share with others.


  57. Im also getting the ‘Please Add Items To The Org Chart list’ issue. I am using the downloaded list template and have made no changes to it except to rename it to ‘Org Chart Data Source’ as suggested above.

    Global Mode Configuration:
    Rendering Mode -> SharePointListMode
    List to use -> Org Chart Data Source

    Global Display Configuration:
    HTML allowed
    Collapsing allowed

    Column Configuration (List Mode):
    Employee ID -> Employee ID
    Employee Name -> Employee Name
    Manager ID -> Superior ID
    Employee Work Phone -> Phone
    Employee Address -> Address
    Employee Email -> Email

    So frustrating as I feel I am so close to having exactly what we need! :( Not sure if I shoud go off and look for another web part.

  58. Hi, I’m trying to install this webpart in SharePOint 2013 but i receive an error saying that the file should be .webpart or .dwp. Do you have this version in 2013?

Leave a Reply

Your email address will not be published. Required fields are marked *