首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

JFreeChart饼图撤除图中标签

2012-12-23 
JFreeChart饼图取消图中标签//创建圆饼图JFreeChartchartChartFactory.createPieChart3D(title,data,true

JFreeChart饼图取消图中标签

//创建圆饼图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%")));

热点排行