Quantcast
Channel: SCN : All Content - SAP for Mobile
Viewing all articles
Browse latest Browse all 6147

How to display MAKit graph in HTMLVIEW control ?

$
0
0
Hello,
I was trying to load MAKit graphs in HTMLVIEW control in a Mobile workflow screen. When I tried to run that application on Android emulator, it didn't work. I couldn't able to figure out the reason. Any help regarding this will be greatly appreciated.
Let me try to explain what have I done :
In the screen added a HTMLVIEW control with following proprties :
KEY = "ChartKey"
Default Value = <div id="contents">  <div id="columnChart_1" class="chart"></div>  </div>
~~~~~~~~~~~~~~~~~~~~~~~~~~~
In custom.js file the following code has been added in the function module "customAfterShowScreen".
function customAfterShowScreen(screenToShow, screenToHide) {
if (screenToShow === "ColumnChart") {
arrangeCharts(1, 1, "contents");//only one chart on then screen
showFullBiChart("columnChart_1", "data/bi_chart_bar.xml");
}
}
function showFullBiChart(htmlElementID, metadataFile) {
var elem = document.getElementById(htmlElementID);
var chart = new $MA.Chart(elem.id, true);
chart.load(metadataFile);
}
~~~~~~~~~~~~~~~~~~~~~~~~~
Following code has been added in MyQuery.js along with other functions.
function  executeMAQuery(chartObj, name, args){
var dataTable;
if (name === "productRevenueByYear") {
dataTable = getProductRevenueByYearData();
chartObj.setDataTable(dataTable);
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
If someone has tried to achieve this then please let me know how to do this or if there is any problem . This is the example I was trygin to achieve from MAKit developer guide from Page 54 onwards.
Regards,
Vicky

Viewing all articles
Browse latest Browse all 6147

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>