My task is to create an organizational chart in SharePoint that should be linked with Active Directory. I learned some articles and I also found Organization Browser in my site, but I am unable to understand this web part. How can I create an Organization Chart in SharePoint 2013 ? I have implemented the following code, but it shows me only login user information, neither his manager nor his followers.. the javascript code and result image is attached below.
<script type="text/javascript">
function CreateHierarchyChartControl(parentId, profileId, type, persistControlId) {
var i = profileId.indexOf("|");
var claimsmode = profileId.substr(i-1,1);
if((i >=0 ) & (claimsmode=="w"))
{
profileId = profileId.substr(i+1,profileId.length-i-1);
var initParam = profileId + ',' + type + ',' + persistControlId;
var host = document.getElementById(parentId);
host.setAttribute('width', '100%');
host.setAttribute('height', '100%');
Silverlight.createObject('/_layouts/ClientBin/hierarchychart.xap',host,'ProfileBrowserSilverlightControl',{
top: '30',
width: '100%',
height: '100%',
version: '2.0',
isWindowless: 'true',
enableHtmlAccess: 'true'
},{
onLoad: OnHierarchyChartLoaded
},initParam,null);
}
}
</script>![enter image description here][1]