`
bannamoon
  • 浏览: 51588 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

JFreeChart饼图取消图中标签

    博客分类:
  • JAVA
阅读更多
//创建圆饼图
JFreeChartchart=ChartFactory.createPieChart3D(title,data,true,false,false);
PiePlotplot=(PiePlot)chart.getPlot();
plot.setLabelGenerator(null);//取消图中标签
plot.setIgnoreZeroValues(true);//消除数据值为0的项
//图例显示百分比:自定义方式,{0}表示选项,{1}表示数值,{2}表示所占比例
plot.setLegendLabelGenerator(newStandardPieSectionLabelGenerator("{0}={1}({2})",NumberFormat.getNumberInstance(),newDecimalFormat("0.00%")));
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics