cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 Layout which accepts MII I5charts/Grids

0 Kudos

Hello,

I am trying to create a page with several I5Charts and normal UI5 tables and use them in a matrix layout to align them.

I get below JS error when I try to place I5charts to a matrix/virtical/horizontal layout.

Which layout container in UI5 that MII charts can be placed in?

Regards

Suneel

Error: "[object Object]" is not valid for aggregation "rows" of Element sap.ui.commons.layout.MatrixLayout#__layout0 @ https://sapui5.netweaver.ondemand.com/resources/sap-ui-core.js:134

Below is the code snippet

        var a  = new sap.ui.commons.layout.MatrixLayout ( { widths : "100%" } );

        var graph = new com.sap.xmii.chart.hchart.i5Chart("Mii/Common/Avail", "Mii/PM/Query/Avail");

        graph.setChartWidth("640px");

        graph.setChartHeight("400px");

       

        a. addRow(graph);

Accepted Solutions (0)

Answers (1)

Answers (1)

Private_Member_14935
Active Participant
0 Kudos

Hi Suneel,

addRow() expects {sap.ui.commons.layout.MatrixLayoutRow} object as parameter. Hence use createRow() which will take

in {sap.ui.commons.layout.MatrixLayoutCell|sap.ui.core.Control|string}


i.e change your code as follows:

a. createRow(graph);


Hope this helps!


Best Regards,

Ria


0 Kudos

Thanks for the response Ria,

If I do so, it is adding this text instead of the chart.

Private_Member_14935
Active Participant
0 Kudos

Hi Suneel,

Please ignore my previous reply, i5Chart is a js wrapper js class using existing UI5 controls, hence it cannot be passed as parameter to createRow() as I had mentioned earlier.

We normally use the normal HTML table tag to embed i5Chart while creating layouts. Will update if I find something, let us know if you find a way for doing the same.

Thanks and Best Regards,

Ria