Skip to Content
Aug 21, 2012 at 05:28 AM

How to display MAKit graph in HTMLVIEW control ?


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(, 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