沒關係,發現它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」是可以在「設置統計圖格式」選項卡中找到當圖表被雙擊的「簡單的串聯式」的稱號。
您應該將您的答案標記爲accacent,以便其他人知道您不再尋求幫助。 –