Skip to Content
0
Jul 28, 2016 at 03:25 PM

Cannot read property 'categoryAxis' of null - dual_column viztype

551 Views

Hello everybody,

I'm trying to use viztype dual_column or info/dual_column in my app with sapui5 version 1.28.1 on premise, but there is an error in the console when I run the app:

Uncaught TypeError: Cannot read property 'categoryAxis' of null

This doesn't allow to show the chart.

If I run this on HCP with the latest version of sapui5, runs well.

Debugging a little bit the api, I could see that this viztype doesn't appear in the list of types running the method sap.viz.api.metadata.Viz.get() (I checked all the array, I expanded the info/column only for illustration) but I could see the definition of the type dual_column in sap-viz-controls.js, that's why I think it is an strange behavior of the api, I hope to be wrong because I need to be going live with this app in the next days, please if somebody knows what could I do in this case.



The following is the chart definition in the xml file:


<viz:VizFrame id="idoVizFrame4" width="100%" height="100%" vizType='info/dual_column' class="sapUiForceWidthAuto sapUiResponsiveMargin"
  vizProperties="{title:{text:'Ventas año 2016 acumulado por portafolio'}}" uiConfig ="{ applicationSet : 'fiori'}">
  <viz:dataset>
  <viz.data:FlattenedDataset data="{ChartAccumModel>/}">
  <viz.data:dimensions>
  <viz.data:DimensionDefinition name="Portafolio" value="{ChartAccumModel>Portafolio}"/>
  </viz.data:dimensions>
  <viz.data:measures>
  <viz.data:MeasureDefinition value="{ChartAccumModel>Cumplimiento}" name="Cumplimiento"/>
  <viz.data:MeasureDefinition value="{ChartAccumModel>Venta}" name="Venta"/>
  <viz.data:MeasureDefinition value="{ChartAccumModel>Presupuesto}" name="Presupuesto"/>
  </viz.data:measures>
  </viz.data:FlattenedDataset>
  </viz:dataset>
  <viz:feeds>
  <viz.feeds:FeedItem uid="categoryAxis" type="Dimension" values="Portafolio"/>
  <viz.feeds:FeedItem uid="valueAxis" type="Measure" values="Presupuesto,Venta"/>
  <viz.feeds:FeedItem uid="valueAxis2" type="Measure" values="Cumplimiento"/>
  </viz:feeds>
  </viz:VizFrame>

I appreciate all your collaboration.


Best regards.


Jhon Jairo