Step 1 - Add the manager and position column in criteria
Step 2: Create a Narrative View as below
Prefix:
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
if(document.URL.indexOf("saw.dll?Answers") == -1) {
google.load('visualization', '1', {packages:['orgchart']});
google.setOnLoadCallback(drawOrgChart);
}
function drawOrgChart() {
if(document.URL.indexOf("saw.dll?Answers") == -1) {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Name');
data.addColumn('string', 'Manager');
data.addColumn('string', 'ToolTip');
var myOrgArray=[];
var tempStr = "";
Narrative:
myOrgArray.push([{v:"@2".replace(" "," "), f:"@2<br/><font color=red><i>@3<i></font>".replace(" "," ")}, "@1".replace("--",""), "@3"]);
Postfix:
data.addRows(myOrgArray);
var chart = new google.visualization.OrgChart(document.getElementById('div_orgchart'));
chart.draw(data, {allowHtml:true});
}
}
</script>
<div id='div_orgchart'></div>
Till Next time..
7 comments:
what is the use of var tempStr = ""; in this code?
this is very useful - i have tried this on a dashboard to draw an org chart. I have added prompts to change the top level org level shown and the chart just disappears have you tried similar?
Hi, Thank you for sharing this wonderful chart with us.
But I think i have hit the dead end with extra functionality with this Org chart, I am trying to use Employee pictures in this chart instead of employee names. Now when i make reference to the pictures it shows in my table report but when i try to use this in Narrative view it doesnt work.
Is there any way to show pictures instead of names in this report. + can we make this interactive as when i click on employee picture it shows the detailed report for that empoyee?
Thank you
If you keep filter for manager as Prompted and create a prompt for Manager name and then try to run this report from dashboard yes it does change the graph values on its own.
Hi, Thanks for this information on organization chart. I implemented this on OBIEE 11.1.1.7.0. But the chart did not get displayed in narrative view. Could you please let me know if there are any prerequisites for creating an org chart?
Hi
Thank you very much for sharing this organization
Chart concept, I have implemented this
And it is working as expected, now one thing
I am not able to do is, how I can make it collapsible.
Say, I click on 1st level then only 2nd level should
Appear and so on.
Please let me know is it possible to do?
Thanks in advance.
Post a Comment