Sie sind auf Seite 1von 3

2/27/2018 Charts in OBIEE using Google API | Proficient BI

OBIEE

Charts in OBIEE using Google API


SEPTEMBER 5, 2016 | KUMAR | LEAVE A COMMENT

Here are the steps to create an donut chart using google API. This visualization is built using an
API for pie chart which gives different look and feel.

Google gallery have different interactions which can be embedded into OBIEE.

https://developers.google.com/chart/interactive/docs/gallery

Here are the steps to create a donut chart in OBIEE.

1. Add a dimension and measure in the criteria, something like this:

https://www.proficientbi.com/obiee-charts-google-api/ 1/3
2/27/2018 Charts in OBIEE using Google API | Proficient BI

2. Add Narrative view and add the following code, the columns need to be changed as per your
criteria

In the Pre x add the following code:

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js">


</script>
<script type="text/javascript">
//if(document.URL.indexOf("saw.dll?Answers") == -1) {
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
//}

function drawChart() {
if(document.URL.indexOf("saw.dll?Answers") == -1) {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Status');
data.addColumn('number', 'Count');
var myArray=[];

In Narrative Section: 

myArray.push(["@1", @2]);

https://www.proficientbi.com/obiee-charts-google-api/ 2/3
2/27/2018 Charts in OBIEE using Google API | Proficient BI

In Post x add this code: 

data.addRows(myArray);
// Create and draw the visualization.
var chart = new
google.visualization.PieChart(document.getElementById('donutchart'));;
chart.draw(data, {width: 700, height:300, pieHole: 0.4, pieSliceText:
'value'});
}
// colors can be customized with this: colors:['#50F550','#FFA500', '#FF3C3C',
'#FFFF78','#287AC3','#9123DA', '#00BFB5', '#C6687B', '#68C6C2' ]
}
</script>
<div id="donutchart" style="width: 400px; height: 300px;"></div>

Note: The chart may not be visible in results view sometimes, it will work well when placed on
the dashboard. Visit google gallery for any other parameters needed.

Related

Data Visualizations with External OBIEE 10g to 11g Upgrade Migrating from Oracle Business
JavaScript Library D3 in OBIEE Questions Intelligence 11g to 12c
September 6, 2016 October 5, 2014 September 20, 2016
In "OBIEE" In "OBIEE" In "OBIEE"

GOOGLE CHARTS INTERVIEW OBIA OBIEE ORACLE

https://www.proficientbi.com/obiee-charts-google-api/ 3/3