生成2018时序统计图:
public static JFreeChart tongjitu(){
StandardChartTheme standardChartTheme = new StandardChartTheme("CN");
standardChartTheme.setExtraLargeFont(new Font("宋书", Font.BOLD, 25));
standardChartTheme.setRegularFont(new Font("宋书", Font.PLAIN, 15));
standardChartTheme.setLargeFont(new Font("宋书", Font.PLAIN, 15));
ChartFactory.setChartTheme(standardChartTheme);
JFreeChart chart = ChartFactory.createTimeSeriesChart("2018产品销售统计图","月份","销售金额(万)", shuju(),false, false,false);
XYPlot plot = chart.getXYPlot();
plot.setDomainGridlinesVisible(true);
DateAxis da = (DateAxis) plot.getDomainAxis();
DateFormat format = new SimpleDateFormat("MM");
DateTickUnit dt = new DateTickUnit(DateTickUnit.DAY,30,format);
da.setTickUnit(dt);
return chart;
}