-1

我正在使用 JFreechart 创建图表。当我创建饼图时,饼图的值以整数格式显示。但我需要百分比中的这些值。

My current Output :- 

Service manager (1)
Service Executive (6)
Service co-coordinator (3)

My Expected output :-


Service manager (10%)
Service Executive (60%)
Service co-coordinator (30%)

示例代码:-

for(int i=0;i<dataset_bydeglist.size();i+=2){
                        dataset.setValue(dataset_bydeglist.get(i).toString()+" ("+(Integer)dataset_bydeglist.get(i+1)+") ",(Integer)dataset_bydeglist.get(i+1));
                    }

向数据集添加值。所有数据都在数组列表中。

请帮我。

4

1 回答 1

1

PieChartDemo2是一个使用 a的例子StandardPieSectionLabelGenerator这里有一个相关的例子。

于 2012-08-25T13:19:26.353 回答