没有合适的资源?快使用搜索试试~ 我知道了~
这个与动态生成表统计图有着很重要的关系。希望能帮助到大家。欢迎大家的下载。
资源推荐
资源详情
资源评论
package cn.infocore.www;
import java.awt.Color;
import java.awt.Font;
import java.io.File;
import java.io.FileOutputStream;
import java.io.UnsupportedEncodingException;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.CategoryLabelPositions;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.renderer.category.LineAndShapeRenderer;
import org.jfree.chart.title.TextTitle;
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.general.DatasetUtilities;
public class CreateLinechart {
/**
* 图片保存的根目录
* @param filename
* @return
*/
public String Savepath(){
String path = getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
String testpath = path.substring(0,path.lastIndexOf("WEB-INF"));
String filepath = testpath+"images/";
import java.awt.Color;
import java.awt.Font;
import java.io.File;
import java.io.FileOutputStream;
import java.io.UnsupportedEncodingException;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.CategoryLabelPositions;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.renderer.category.LineAndShapeRenderer;
import org.jfree.chart.title.TextTitle;
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.general.DatasetUtilities;
public class CreateLinechart {
/**
* 图片保存的根目录
* @param filename
* @return
*/
public String Savepath(){
String path = getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
String testpath = path.substring(0,path.lastIndexOf("WEB-INF"));
String filepath = testpath+"images/";
System.out.println(filepath);
return filepath;//Tomcat的中webapps目录下项目的images文件夹
}
/**
* 柱状图,折线图 数据集 方法
*/
public CategoryDataset getBarData(double[][] data, String[] rowKeys,
String[] columnKeys) {
return DatasetUtilities.createCategoryDataset(rowKeys, columnKeys, data);
}
private void isChartPathExist(String chartPath) {
File file = new File(chartPath);
if (!file.exists()) {
file.mkdirs();
// log.info("CHART_PATH="+CHART_PATH+"create.");
}
}
/**
* 折线图样式
* @param chartTitle
* @param x
* @param y
* @param xyDataset
* @param charName
* @return
*/
return filepath;//Tomcat的中webapps目录下项目的images文件夹
}
/**
* 柱状图,折线图 数据集 方法
*/
public CategoryDataset getBarData(double[][] data, String[] rowKeys,
String[] columnKeys) {
return DatasetUtilities.createCategoryDataset(rowKeys, columnKeys, data);
}
private void isChartPathExist(String chartPath) {
File file = new File(chartPath);
if (!file.exists()) {
file.mkdirs();
// log.info("CHART_PATH="+CHART_PATH+"create.");
}
}
/**
* 折线图样式
* @param chartTitle
* @param x
* @param y
* @param xyDataset
* @param charName
* @return
*/
剩余7页未读,继续阅读
资源评论
快乐的使者
- 粉丝: 1
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于SpringBoot+Vue3快速开发平台、自研工作流引擎源码设计.zip
- docker安装部署全流程
- 基于树莓派的人脸识别系统python源码+项目部署说明+超详细代码注释.zip
- Python和R爬取分析赶集网北京二手房数据.zip
- Python和R爬取分析赶集网北京二手房数据.zip
- Java知识体系最强总结(2021版).txt
- Python知识点Python知识点Python知识点Python知识点Python知识点PythonPython知识点.txt
- Java开发基于seetaface6的人脸识别(活体检测)的封装源码.zip
- JSP在线失物招领管理平台源码.zip
- JSP在线旅游美食展现管理系统源码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功