cancel
Showing results for 
Search instead for 
Did you mean: 

How to display MAKit graph in HTMLVIEW control ?

jainvicks
Explorer
0 Kudos
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

Accepted Solutions (0)

Answers (1)

Answers (1)

vickyokrm
Participant
0 Kudos

Hi Vicky,

As am New to this MAkit in sybase unwired platform am searching related documents to learn it,

If possible can u please share me the dev guide for makit , and could please tell me how to use makit in my hwc application.

Thanks,

Vicky,.

jainvicks
Explorer
0 Kudos

Hello Vignesh,

you can find the documentation in Sybase online book under Sybase Unwired Platform 2.1 #3.

I'm aslo trying to achieve the same but didn't get any success so far and hence I posted the query in the forum .

Thanks,

Vicky

0 Kudos

Hi vicky,

can you please tell me what was the solution you got for this. Because Im trying the same example now but couldnt find the the output. Struck in the middle. If possible share me with an example about using MAkit in sybase unwired platform with HTMLview.

Thanks,

Gowri

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

Here is one example of using MAKit in a Hybrid App.

Using Sencha Touch, MBOs and MAKit https://cw.sdn.sap.com/cw/docs/DOC-152392

0 Kudos

Hi Daniel, Cant we use the MAKit without the help of Sencha Touch???

I gone through the same procedure as mentioned in the MAKit developer guide. The problem is in retrieving the charts  Can you please help me to get out of this.

Thanks,

Gowri.

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

Yes, MAKit can be used without Sencha Touch.  The above example just happened to use Sencha Touch as the UI framework.  Perhaps start a new post and include more details of the problem you are having and hopefully someone can spot the problem.

Former Member
0 Kudos

Hi Gowri,

Have you reviewed the code example tutorial on SCN?

http://scn.sap.com/docs/DOC-30246

This should provide you with the information you need to get MAKit working with the HWC. Let  me know if you have any questions.

Dave

0 Kudos

Hey Dave i gone thro' this document already. I couldn't connect to that database server. However i completed a sample application with MAKit in SUP. Thank you. It would be helpful if u guide me with Where i can find the MAKit chart properties for a application. For Eg: Me done an application with column chart. Where do i get that chart properties.

Regards,

P.Gowri.

Former Member
0 Kudos

Can you clarify what it is that you want to do? I'm not sure what you mean when you say "where do I get the chart properties".

The best resource is the MAKit Developer guide which you can find at this link. The API is well documented and describes what methods you can use to access the chart's properties.

http://infocenter.sybase.com/help/index.jsp?docset=/com.sybase.infocenter.pubs.docset-SUP-2.1.3/doc/...

Dave

0 Kudos

I have done an application with column chart. When viewing that column chart, i see two icons displayed in the right top as slider control and for viewing the table contents used to plot the chart. In which js file, we see the coding of those two controls.

And let me also know how add additional controls such as

• digitpicker-bg

• digitpicker-button

• e-mail_icon

• fullscreen_icon

to a specified chart say column chart.....

Regards,

Gowri.