{ dataValue = ((Double) obj).doubleValue(); }
categoryDs.addValue(dataValue, null, (String) periods.get(i)); }
JFreeChart c = null;
if (isBarChart) { c = ChartFactory.createBarChart(chartName, titleX, titleY, categoryDs, PlotOrientation.VERTICAL, false, false, false); } else { c = ChartFactory.createLineChart(chartName, titleX, titleY, categoryDs, PlotOrientation.VERTICAL, false, false, false); }
c.getTitle().setFont(new Font("Arial", Font.BOLD, 16));
NumberAxis axis = (NumberAxis) c.getCategoryPlot().getRangeAxis(); axis.setAutoRange(true);
TickUnitSource tickUnits = NumberAxis.createIntegerTickUnits(); axis.setStandardTickUnits(tickUnits);
return (c.createBufferedImage(imageWidth, imageHeight));
} }
(出处:清风学院)
上一篇:Hibernate中对Session管理
下一篇:(翻译)classpath和环境变量设置
|