XYPlot plotxy = chart.getXYPlot();
NumberAxis na= (NumberAxis)plotxy.getDomainAxis();//x轴整数显示
//NumberAxis na= (NumberAxis)plotxy.getRangeAxis();//y轴整数显示
na.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
以上用于线图
CategoryPlot plotBar = chart.getCategoryPlot();
NumberAxis na= (NumberAxis)plotBar.getRangeAxis();
na.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
这个可以用于饼状图。
相关资源:敏捷开发V1.0.pptx