// 设置直方图的绘制渐进色
Color color[] = new Color[bookTitle.length];
color[0] = new Color(99,99,0);
color[1] = new Color(255,169,66);
color[2] = new Color(33,255, 66);
color[3] = new Color(33,0,255);
color[4] = new Color(255,0,66);
for (int i = 0; i
// 设置横轴标题文字的旋转方向
CategoryAxis domainAxis = plot.getDomainAxis();
domainAxis.setCategoryLabelPositions(
CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0)
);
// 结束自定义图表绘制的相关属性
ChartRenderingInfo info =
new ChartRenderingInfo(new StandardEntityCollection());
// 设置图片生成格式
String fileName =
ServletUtilities.saveChartAsPNG(chart, width, height, info, session);