2016-04-15 68 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>