Showing results for 
Search instead for 
Did you mean: 

Size of Null error with VizFrame (type: PIE)

Former Member
0 Kudos


Here is the code for the VizFrame(type pie) in XML:

<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"  xmlns:viz.feeds="sap.viz.ui5.controls.common.feeds"""    xmlns:viz="sap.viz.ui5.controls"

  controllerName="supplychain.dashboard.view.Main" xmlns:html=""  >

  <Page enableScrolling="false">

  <viz:VizFrame id="idVizFrame" uiConfig="{applicationSet:'fiori'}"

                height='100%' width="100%" vizType='pie'>


                    < data="{/DelayRecord}">


                            < name="Name"

                                value="{name}" />



                            < name="Delay"

                                value="{delay}" />





                    <viz.feeds:FeedItem uid="size" type="Measure"

                        values="Delay" />

                    <viz.feeds:FeedItem uid="color" type="Dimension"

                        values="Name" />





Here is the model :


"DelayRecord": [


"name": "CSR",

"delay": 23



"name": "Planner",

"delay": 21




I am setting the model in the controller as follows:

var Model = new  sap.ui.model.json.JSONModel("model/dashboard.json");

  var oVizFrame = this.getView().byId("idVizFrame");


I receive the following error: Uncaught type error: size of null.

Can you please help me resolve this error?



Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Anjana NB, if you must place vizFrame on a sap.m.Page, please ensure the parent of sap.m.Page has size defined. sap.m.Page doesn't accept size but will pick up the size of its' parent. Suggest you to add the page on sap.m.App.

Sai Vellanki, in your snippix, sap.m.App is defined as parent of sap.m.Page and also have MVC view height defined so pie chart can be shown. If you remove both sap.m.App and height of MVC view defined, height of content section of sap.m.Page will be 0.

Active Contributor
0 Kudos

Hi ,

Your code works fine for me: Plunker