2016-04-15 71 views
0

我想用Tab-View开发sapui5视图。在第一个标签上必须有两个圆环图(sap.viz.ui5.controls)。对于Tab-View,我使用IconTabBar。 我可以在没有IconTabBar的情况下显示图表,但是当我在tab-view中实现图表视图时,它是空的。 另外,当我把两个甜甜圈图表放在Horizo​​ntalLayout中。 有没有人有想法?sapui5 Vizframe和IconTabBar

亲切的问候 基尔斯滕

Tab-View: 
<Page id="detail_Tab" title="{i18n>Title}" showNavButton="false" > 
     <IconTabBar> 
      <items> 
       <IconTabFilter text="Overview"> 
        <mvc:XMLView viewName="{...}.view.Detail_Overview"/> 
       </IconTabFilter> 

      </items> 
     </IconTabBar> 
    </Page> 

Detail_Overview:

<viz:VizFrame 
     id="idDonutChartPriority" 
     height="100%" 
     width="100%"></viz:VizFrame> 

回答

1

我猜想,你有你的VizFrame S的height="100%"财产的问题。尝试将它们设置为px大小。你可以在JSBin上试试here

IconTabBar的高度与其内容相符。如果您的内容拥有100%的高度,则会导致100%为零。

如果你想使用100%,你可以尝试在你的IconTabBar上设置stretchContentHeight="true"。它determines whether the IconTabBar height is stretched to the maximum possible height of its parent container. As a prerequisite, the height of the parent container must be defined as a fixed value.

0
<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:viz="sap.viz.ui5.controls" controllerName="view1"> 
<IconTabBar> 
      <items> 
       <IconTabFilter text="Overview"> 
        <viz:VizFrame 
        id="sample" 
        height="500px" 
        width="100%"></viz:VizFrame> 
       </IconTabFilter> 
      </items> 
     </IconTabBar> 
</mvc:view>