Steps to Create Heat Map in OBIEE
Step : Create the subject area with dimension and fact columns as shown below
Step 2: Add the Narrative scripts as shown 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:["treemap"]});
google.setOnLoadCallback(drawHMChart);
}
function drawHMChart() {
if(document.URL.indexOf("saw.dll?Answers") == -1) {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Region');
data.addColumn('string', 'Parent');
data.addColumn('number', 'Revenue');
data.addColumn('number', 'Quantity');
myHMArray=[];
myHMArray.push(["All Brands",null,0,0]);
}
Narrative :
myHMArray.push(["@1","All Brands",@2,@3]);
Postfix:
if(document.URL.indexOf("saw.dll?Answers") == -1) {
data.addRows(myHMArray);
// Create and draw the visualization.
var tree = new google.visualization.TreeMap(document.getElementById('div_Heatmap'));
tree.draw(data, {
minColor: '#f00',
midColor: '#ddd',
maxColor: '#0d0',
headerHeight: 15,
fontColor: 'black',
showScale: true});
}
}
</script>
<b>Note: Revenue represented by size and Billed quantity represented by color</b>
<div id="div_Heatmap" style="width: 900px; height: 500px;"></div>
Step 3: Results as shown below
It is not working for me..Do I need to do anything specific
ReplyDelete