freeChart设置字体
来源:互联网 发布:淘宝导航条怎么做 编辑:程序博客网 时间:2024/05/22 06:36
JFreeChart chart = ChartFactory.createPieChart3D(title,data,true,true, false);
//设置图片的背景色
chart.setBackgroundPaint( new java.awt.Color(189,235,255));
//设置图片标题的字体和大小
Font font = new Font("黑体", Font.CENTER_BASELINE, 16);
TextTitle _title = new TextTitle(title);
_title.setFont(font);
chart.setTitle(_title);
PiePlot plot = (PiePlot) chart.getPlot();
plot.setInsets(new Insets(5, 5, 5, 5));
//在统计图片上建连结
plot.setStartAngle(270);
//指定显示的饼图上圆形还椭圆形
plot.setCircular(false);
// 设置饼图各部分标签字体
plot.setLabelFont(new Font("隶书",Font.PLAIN,15));
//指定图片的透明度
plot.setForegroundAlpha(1.0f);
// 没有数据时显示的消息
plot.setNoDataMessage("该项没有数据记录");
plot.setNoDataMessageFont(new Font("黑体", Font.CENTER_BASELINE, 16));
plot.setNoDataMessagePaint(Color.RED);
//抽离一个 section 出来,不支持3D
plot.setSectionOutlinePaint(Color.BLACK);
// 显示百分比
plot.setLabelGenerator(new StandardPieItemLabelGenerator(StandardPieItemLabelGenerator.DEFAULT_TOOLTIP_FORMAT));
//设置背景的透明度
plot.setBackgroundAlpha(0.6f);
//把生成的图片放到临时目录
ChartRenderingInfo info = new ChartRenderingInfo(new
StandardEntityCollection());
//500是图片长度,300是图片高度
filename = ServletUtilities.saveChartAsJPEG(chart, wPhoto, hPhoto, info,session);
ChartUtilities.writeImageMap(pw, filename, info);
//设置图片的背景色
chart.setBackgroundPaint( new java.awt.Color(189,235,255));
//设置图片标题的字体和大小
Font font = new Font("黑体", Font.CENTER_BASELINE, 16);
TextTitle _title = new TextTitle(title);
_title.setFont(font);
chart.setTitle(_title);
PiePlot plot = (PiePlot) chart.getPlot();
plot.setInsets(new Insets(5, 5, 5, 5));
//在统计图片上建连结
plot.setStartAngle(270);
//指定显示的饼图上圆形还椭圆形
plot.setCircular(false);
// 设置饼图各部分标签字体
plot.setLabelFont(new Font("隶书",Font.PLAIN,15));
//指定图片的透明度
plot.setForegroundAlpha(1.0f);
// 没有数据时显示的消息
plot.setNoDataMessage("该项没有数据记录");
plot.setNoDataMessageFont(new Font("黑体", Font.CENTER_BASELINE, 16));
plot.setNoDataMessagePaint(Color.RED);
//抽离一个 section 出来,不支持3D
plot.setSectionOutlinePaint(Color.BLACK);
// 显示百分比
plot.setLabelGenerator(new StandardPieItemLabelGenerator(StandardPieItemLabelGenerator.DEFAULT_TOOLTIP_FORMAT));
//设置背景的透明度
plot.setBackgroundAlpha(0.6f);
//把生成的图片放到临时目录
ChartRenderingInfo info = new ChartRenderingInfo(new
StandardEntityCollection());
//500是图片长度,300是图片高度
filename = ServletUtilities.saveChartAsJPEG(chart, wPhoto, hPhoto, info,session);
ChartUtilities.writeImageMap(pw, filename, info);
- freeChart设置字体
- FreeChart -- 时序图实例解析 -- 设置日期显示格式
- 使用freeChart 例子
- freechart的api
- 使用freeChart 例子
- freechart 简单应用
- 设置字体
- 字体设置
- 设置字体
- 字体设置
- 设置字体
- 设置字体
- 设置字体
- 设置字体
- 字体设置
- 设置字体
- iOS 设置字体 自定义字体
- iOS 设置字体 自定义字体
- 雏田相册1.0版原码与思路
- String,StringBuffer,StringBuilder之间的区别和联系
- httpModules 的 add 元素
- Xcode中iOS单元测试
- newlisp 使用crypto模块
- freeChart设置字体
- 在.NET使用JSON作为数据交换格式
- TSE源码中MD5代码分析(1)
- Linux内核3.7 TCP Fast Open验证实例
- spring采用注解方式实现AOP
- 邮票面值,求最大的连续区间
- linux 动态库的生成与使用
- Linux安装JDK1.7
- watir中如何获取dom属性?