代码主要是计算不同组别平均值、标准差数据之间的绝对偏差。解决了columnKey的中文乱码问题
根据自己的需要做修改,有生成pdf和生成JPG图片,两种保存到本地的方式,客户端形式的也挺多的,代码内就不添加了。看完基础教程,理清楚一共有几个部分再进行相应功能的修改还是可以的。
放一下JFreeChart作者的github传送门
https://github.com/jfree?page=1&tab=repositories
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.NumberAxis;
import org.jfree.chart.axis.NumberTickUnit;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.block.BlockContainer;
import org.jfree.chart.labels.CategoryItemLabelGenerator;
import org.jfree.chart.labels.StandardCategoryItemLabelGenerator;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.renderer.category.Cate