jfreechart乱码问题
来源:互联网 发布:mac app store软件少 编辑:程序博客网 时间:2024/04/29 15:42
生成图片中需要显示中文,但是中文会有乱码问题,网上找了下,设置一下字体就没事了,原因不清楚。
柱状图(CategoryPlot):
CategoryPlot plot=chart.getCategoryPlot();//获取图表区域对象
CategoryAxis domainAxis=plot.getDomainAxis();
//水平底部列表
domainAxis.setLabelFont(new Font("黑体",Font.BOLD,14));
//水平底部标题
domainAxis.setTickLabelFont(new Font("宋体",Font.BOLD,12));
//垂直标题
ValueAxis rangeAxis=plot.getRangeAxis();//获取柱状
rangeAxis.setLabelFont(new Font("黑体",Font.BOLD,15));
饼图(PiePlot):
JFreeChart chart = ChartFactory.createPieChart3D("IT行业职业分布图", dataset, true, false, false);
chart.getTitle().setFont(new Font("黑体",Font.BOLD,20));//设置标题字体
PiePlot piePlot= (PiePlot) chart.getPlot();//获取图表区域对象
piePlot.setLabelFont(new Font("黑体",Font.BOLD,10));
chart.getLegend().setItemFont(new Font("黑体",Font.BOLD,10));
时序图(TimeSeries) XYPlot :
XYPlot plot = (XYPlot) chart.getPlot();
//纵轴字体
plot.getRangeAxis().setLabelFont(new Font("宋体", Font.BOLD, 15));
//横轴框里的标题字体
chart.getLegend().setItemFont(new Font("宋体", Font.ITALIC, 15));
//横轴列表字体
plot.getDomainAxis().setTickLabelFont(new Font("新宋体", 1, 15));
//横轴小标题字体
plot.getDomainAxis().setLabelFont(new Font("新宋体", 1, 12));
- JFreeChart 中文乱码问题
- JFreeChart乱码问题
- jfreechart中文乱码问题
- jfreechart 乱码问题
- jfreechart解决乱码问题。
- jfreechart乱码问题
- jfreechart乱码问题
- JfreeChart 乱码问题处理
- JFreeChart的乱码问题
- jfreechart乱码问题
- jfreechart中文乱码问题
- jfreechart的中文乱码问题
- JFreeChart中文乱码的问题
- JfreeChart 解决中文乱码问题
- JFreeChart 解决中文乱码问题
- 解决JFreeChart中文乱码问题
- 解决JfreeChart中文乱码问题
- linux下jfreechart乱码问题
- 从html文件中提取超链接URL的shell脚本
- 内联,左外联,右外联,全连接,交叉连接 的区别
- Encode in UTF-8 Without BOM
- iptables实践
- 中断机制
- jfreechart乱码问题
- EditText属性大全
- 网络爬虫
- 匈牙利命名法、骆驼命名法、帕斯卡(pascal)命名法
- Android控件GridView之仿支付宝钱包首页带有分割线的GridView九宫格的完美实现
- NSDate 与时间戳转换关系
- Redis内存使用优化与存储
- sizeToFit (自适应UILable的大小)
- ARM协处理器主要用途 及其 指令CDP LDC STC MCR MRC介绍