1

我有一个使用 BIRT 的饼图。工作正常,但问题是它只显示“适合”图表大小的数据。饼图是否有等效的“可以增长”属性?我的意思是,只有当我将饼图调整为更大的饼图时,才会显示所有数据。但是如果我选择大量的数据,它就不再适合了。我需要根据要显示的数据量来“自动调整大小”。

我尝试修改高级设置,但没有任何效果

  • 格式 - 溢出:自动、滚动和可见
  • 下推 - 设置为 true

我没有看到与饼图格式相关的任何其他属性。谁能指出我正确的方向?谢谢。

4

1 回答 1

0

没关系,在这里找到了,但我稍微调整了一下。图表本身的 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”是“简单系列”类型的标题,双击图表时可以在“格式化图表”选项卡中找到。

于 2013-05-15T13:31:59.703 回答