JFreeChart饼状图显示数字
2013-04-03 00:00
155 查看
饼图标签显示百分比方法
PiePlot pp = (PiePlot)chart.getPlot();
pp.setLabelGenerator(new StandardPieSectionLabelG
enerator("{2}"));
如果百分比要包括一位小数,则使用
pp.setLabelGenerator(new StandardPieSectionLabelG
enerator("{2}",new DecimalFormat("0.0"),new DecimalFormat("0.0%")));
显示实际数值
PiePlot pp = (PiePlot)chart.getPlot();
pp.setLabelGenerator(new StandardPieSectionLabelG
enerator("{1}"));
PiePlot pp = (PiePlot)chart.getPlot();
pp.setLabelGenerator(new StandardPieSectionLabelG
enerator("{2}"));
如果百分比要包括一位小数,则使用
pp.setLabelGenerator(new StandardPieSectionLabelG
enerator("{2}",new DecimalFormat("0.0"),new DecimalFormat("0.0%")));
显示实际数值
PiePlot pp = (PiePlot)chart.getPlot();
pp.setLabelGenerator(new StandardPieSectionLabelG
enerator("{1}"));
相关文章推荐
- jfreechart生成饼状图,web显示
- Flash8-动态垂直显示数字
- (4)Jfreechart之IntervalBarChart(显示差值的图表)
- 阿拉伯数字显示成英文
- c# 导出excel 数字太长而显示为科学计数法的解决方法
- js数字千分位显示的两个关键函数
- PHP采用超长(超大)数字运算防止数字以科学计数法显示的方法
- iOS 底部按钮和应用图标显示未读消息(带数字)
- 格式化较大数字的显示问题
- jfreechart图表在linux上运行不显示
- (4)51单片机入门案列-8个数码管中循环显示数字0-9
- safari浏览器数字显示长度不一致的问题
- 前端输入密码显示**,点击某个控件显示数字
- 2、使用地址表实现如下功能:根据输入的数字1-7,分别显示相应的英文星期名,如果输入其他字符,则重新输入。
- android显示数字时,String 字符串的操作【三位一逗号、去除科学计数法】
- Git进行版本控制添加文件时,中文文件名乱码显示数字问题
- JS中同步显示并分割输入的数字字符串
- ASP 无重复数字随机函数, 数组实现, 并应用于随机显示记录集 By shawl.qiu
- 在Excel中让数字以文本的形式显示
- Android 桌面图标右上角显示未读消息数字