XYPlot plot = chart.getXYPlot();
plot.setForegroundAlpha(0.5f);
XYItemRenderer renderer = plot.getRenderer();
renderer.setToolTipGenerator(
new StandardXYToolTipGenerator(
StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT,
new **DateFormat(yyyy-MM),
new DecimalFormat( "0 )
)
);
DateAxis dateAxis = new DateAxis( "时间 ");
dateAxis.setDateFormatOverride(new **DateFormat( "yyyy-MM ")); dateAxis.setAutoRange(true);
dateAxis.setTickMarkPosition(DateTickMarkPosition.MIDDLE);
plot.setDomainAxis(dateAxis);
//为柱图设置“数据挖陷”
//第一个参数是跳转的连接地址
renderer.setBaseItemURLGenerator(new StandardCategoryURLGenerator(
"detail.jsp", "fruit", ""));