cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

i5Chart not rendering

former_member202208
Active Participant
0 Likes
624

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,

Accepted Solutions (0)

Answers (1)

Answers (1)

RiaNinan
Product and Topic Expert
Product and Topic Expert
0 Likes

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

former_member202208
Active Participant
0 Likes

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..

RiaNinan
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Sridhar,

From the javascript error, it looks like the query doesn't return data. Can you please check the query result for Demo/Query Template/GetPLCData_PCoQry

Regards,

Ria

former_member202208
Active Participant
0 Likes

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..

RiaNinan
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Sridhar,

A few questions based on the above log:

1. Is the display template configured for automatic refresh.

2. Will it be possible to share the query result or the structure of the query output?

The reason why the i5Chart fails still looks unclear to me.

Regards,

Ria

former_member202208
Active Participant
0 Likes

Hi Ria,

1. Yes,'Automatically Refresh' is enabled.

2. 

Let me know if you need more information.

Thanks,

Shridhar.

RiaNinan
Product and Topic Expert
Product and Topic Expert
0 Likes

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

former_member202208
Active Participant
0 Likes

Hello Ria,

I tried by unchecking auto refresh and still not working. I will update to SP5 and test.

Best regards,

Shridhar

RiaNinan
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Shridhar,

I'm still not sure about the actual issue behind the chart not getting rendered, hence not sure if updating to SP05 will fix the issue.

Hope it works, do let us know the result.

Regards,

Ria

former_member202208
Active Participant
0 Likes

Hello Ria,

Chart data is rendering.

I was using iChart, i created a i5Chart and its working.


Thanks,

Shridhar