on ‎2014 May 06 7:03 AM
Hi all,
I am trying out UI5 examples. i5Grid is working but i5Chart is not working.
Is there anything missing in i5Chart?
Code:
<HTML>
<HEAD>
<TITLE>MII 14.0 SP04 HTML 5 Example</TITLE>
<META http-equiv="X-UA-Compatible" content="IE=edge">
<META http-equiv='cache-control' content='no-cache'>
<META http-equiv='expires' content='0'>
<META http-equiv='pragma' content='no-cache'>
<SCRIPT type="text/javascript" src="/XMII/JavaScript/bootstrap.js" data-libs="i5Chart,i5Grid"></SCRIPT>
<SCRIPT language="JavaScript">
var test = new com.sap.xmii.grid.init.i5Grid("Demo/Display Template/GetNotificationNumber_iGrid", "Demo/Query Template/Get_NotificationNum_SQLQry");
test.setGridWidth("640px");
test.setGridHeight("400px");
test.draw("div1");
var test2 = new com.sap.xmii.chart.hchart.i5Chart("Demo/Display Template/GetData_BarChart", "Demo/Query Template/GetPLCData_PCoQry");
test2.draw("mydiv");
</SCRIPT>
</HEAD>
<BODY>
<table>
<tr><td><DIV id="div1"/></td></tr>
<tr><td><DIV id="mydiv"/></td></tr>
</table>
</BODY>
</HTML>
MII version: 14.0 SP4 Patch 3
Thanks,
Request clarification before answering.
Hi Sridhar,
The code looks fine, the i5Chart should have worked fine as well. Does the page throw any javascript errors while rendering.. if so can you please post the errors.
Regards,
Ria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ria,
Thanks for the reply.
Here is the log from IE 9 developer tools
LOG: thisObj.getGridObject() -->
In init of Grid
2014-05-06 12:31:59 registerResourcePath ('CustomControls', '/XMII/JavaScript/') - sap.ui.ModuleSystem
chart draw - end
LOG: Script console debug logs(INFO/LOG level) allowed: false
Unable to get value of the property '0': object is null or undefined
SCRIPT5007: Unable to get value of the property '0': object is null or undefined
ModelData.js, line 1 character 308
SCRIPT5007: Unable to get value of the property '0': object is null or undefined
UI5_Ex.html, line 1 character 1
Thanks,
Shridhar..
Hi,
I tested PCoQry its returning data.
I tested the same in html/applets and its rendering the bar chart.
Log message:
Script console debug logs(INFO/LOG level) allowed: false i5Chart.js:1
2014-05-06 14:12:29 lazy stub for 'sap.viz.ui5.data.FlattenedDataset' (constructor) called. - sap-ui-core-dbg.js:13544
2014-05-06 14:12:29 lazy stub for 'sap.viz.ui5.data.DimensionDefinition' (constructor) called. - sap-ui-core-dbg.js:13544
2014-05-06 14:12:29 lazy stub for 'sap.viz.ui5.data.MeasureDefinition' (constructor) called. - sap-ui-core-dbg.js:13544
Uncaught SyntaxError: Unexpected token u BarChart.js:1
com.sap.xmii.chart.ui5.BarChart.create BarChart.js:1
b i5Chart.js:1
K i5Chart.js:1
h i5Chart.js:1
update i5Chart.js:1
draw i5Chart.js:1
(anonymous function) UI5_Ex.html:19
2014-05-06 14:12:29 FocusHandler setup on Root undefined - sap.ui.core.FocusHandler sap-ui-core-dbg.js:13544
2014-05-06 14:12:29 ThemeCheck: Check styles 'sap-ui-theme-sap.ui.core': true/true/true - sap-ui-core-dbg.js:13544
2014-05-06 14:12:29 ThemeCheck: Check styles 'sap-ui-theme-sap.viz': true/true/true - sap-ui-core-dbg.js:13544
2014-05-06 14:12:29 ThemeCheck: Check styles 'sap-ui-theme-sap.ui.layout': true/true/true - sap-ui-core-dbg.js:13544
2014-05-06 14:12:29 ThemeCheck: Check styles 'sap-ui-theme-sap.ui.commons': true/true/true - sap-ui-core-dbg.js:13544
2014-05-06 14:12:29 ThemeCheck: Check styles 'sap-ui-theme-sap.ui.table': true/true/true - sap-ui-core-dbg.js:13544
2014-05-06 14:12:29 ThemeCheck: Check styles 'undefined': true/false/false - sap-ui-core-dbg.js:13544
2014-05-06 14:12:29 ThemeCheck: Check styles 'undefined': true/false/false - sap-ui-core-dbg.js:13544
2014-05-06 14:12:29 ThemeCheck: Check styles 'undefined': true/false/false - sap-ui-core-dbg.js:13544
2014-05-06 14:12:29 lazy stub for 'sap.ui.core.CustomData' (constructor) called. - sap-ui-core-dbg.js:13544
Attr.specified is deprecated. Its value is always true. sap-ui-core-dbg.js:2631
32
Uncaught TypeError: Cannot read property 'createDataSet' of undefined i5Chart.js:1
updateUI5ModelAndDataset i5Chart.js:1
refreshData i5Chart.js:1
(anonymous function) i5Chart.js:1
(anonymous function) i5Grid.js:1
Thanks,
Shridhar..
Hi Shridhar,
Thanks for the information.
I just want to confirm that the query result shown in the above screenshot and the one that is being passed to the i5Chart are similar(i.e., returns just 1 row).
Also I believe you would have tried by "unchecking" automatically refresh and that too hasn't worked for you.
I tried an i5Chart with PCo Query which returns similar data and it works fine in MII 14.0 SP05
Regards,
Ria
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.