I tried applying this API in OBIEE and have seen that I am unable to view to the last level of records for Org Chart and only brings back first level of data. I have cases where there are data till 5 or 6 levels. I am using a run time prompt to fetch the values.
I have used the following code.
<script type='text/javascript'>
google.load('visualization', '1', {packages:['orgchart']});
google.setOnLoadCallback(setTimeout(drawOrgChart,100));
function drawOrgChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Name');
data.addColumn('string', 'Manager');
data.addColumn('string', 'ToolTip');
var myOrgArray=[];
var tempStr = "";
myOrgArray.push([{v:"@2".replace(" "," "), f:"<b>@1</b><br/><i>@2</i><br/><font color=red><i>@3<i></font><br/><p align=left><i>@6</i><br/><i>@7</i><br/><i>@8</i><br/><i>@9</i><br/><i>@18</i><br/><i>@19</i><br/><i>@20</i><br/><i>DR: @{cc7bd32c91e1113b2}</i></p>".replace(" "," ")}, "<b>@4</b><br/><font color=red><i>@5<i></font><br/><p align=left><i>@10</i><br/><i>@13</i><br/><i>@14</i><br/><i>@11</i><br/><i>@12</i><br/><i>@15</i><br/><i>@16</i><br/><i>@17</i><br/><i>@21</i><br/><i>@22</i><p>".replace("--",""), "@3"]);
data.addRows(myOrgArray);
var chart = new google.visualization.OrgChart(document.getElementById('div_orgchart'));
chart.draw(data, {allowHtml:true});
}
</script>
<div id='div_orgchart'></div>