/** * 更新图表显示 * * @param chart */ private void updatePlot(JFreeChart chart) { // 图表 CategoryPlot categoryPlot = chart.getCategoryPlot(); // y轴 ValueAxis valueAxis = categoryPlot.getRangeAxis(); // Y轴数据范围 valueAxis.setRangeAboutValue(200, 1000); }