Skip to Content
0
Former Member
Sep 16, 2016 at 12:34 PM

Size of Null error with VizFrame (type: PIE)

48 Views

Hi,

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.data="sap.viz.ui5.data" xmlns:viz="sap.viz.ui5.controls"

controllerName="supplychain.dashboard.view.Main" xmlns:html="http://www.w3.org/1999/xhtml" >

<Page enableScrolling="false">

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

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

<viz:dataset>

<viz.data:FlattenedDataset data="{/DelayRecord}">

<viz.data:dimensions>

<viz.data:DimensionDefinition name="Name"

value="{name}" />

</viz.data:dimensions>

<viz.data:measures>

<viz.data:MeasureDefinition name="Delay"

value="{delay}" />

</viz.data:measures>

</viz.data:FlattenedDataset>

</viz:dataset>

<viz:feeds>

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

values="Delay" />

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

values="Name" />

</viz:feeds>

</viz:VizFrame>

</Page>

</core:View>

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");

oVizFrame.setModel(Model);

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

Can you please help me resolve this error?

Regards,

Anjana.