2013-05-15 20 views
1

我有一個使用BIRT的餅圖。工作正常,但問題是它只顯示圖表大小中「合適」的數據。是否有餅圖的「可增長」屬性等價物?我的意思是,只有在將餅圖調整爲較大的餅圖時纔會顯示所有數據。但是如果我選擇大量的數據,它將不會再適合。根據要顯示的數據量,我需要大小爲「自動調整大小」。BIRT餅圖可以增長財產?

我試圖修改高級設置,但沒有奏效

  • 格式 - 溢出:汽車,滾動和Visible
  • 向下推 - 設置爲true

我沒有看到任何其他屬性與餅圖格式有關。任何人都可以指出我正確的方向嗎?謝謝。

回答

0

沒關係,發現它here但我調整了一下。 OnRender將圖表的事件本身輸入:

function afterDataSetFilled(series, dataSet, icsc) 
{ 

    if(series.getSeriesIdentifier() == "categorySeries"){ 
     if(dataSet.getValues().length <= 4){ 
      icsc.getChartInstance().getBlock().getBounds().setWidth(450); 
      icsc.getChartInstance().getBlock().getBounds().setHeight(250); 
      } 
     if(dataSet.getValues().length > 4 && dataSet.getValues().length < 8){ 
      icsc.getChartInstance().getBlock().getBounds().setWidth(450); 
      icsc.getChartInstance().getBlock().getBounds().setHeight(400); 
      } 
     if(dataSet.getValues().length > 8){ 
      icsc.getChartInstance().getBlock().getBounds().setWidth(450); 
      icsc.getChartInstance().getBlock().getBounds().setHeight(600); 
      } 

     } 
} 

「categorySeries」是可以在「設置統計圖格式」選項卡中找到當圖表被雙擊的「簡單的串聯式」的稱號。

+0

您應該將您的答案標記爲accacent,以便其他人知道您不再尋求幫助。 –