|
@@ -39,6 +39,7 @@ import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
|
|
import org.jfree.chart.renderer.xy.XYSplineRenderer;
|
|
import org.jfree.chart.renderer.xy.XYSplineRenderer;
|
|
import org.jfree.chart.title.TextTitle;
|
|
import org.jfree.chart.title.TextTitle;
|
|
import org.jfree.chart.ui.RectangleEdge;
|
|
import org.jfree.chart.ui.RectangleEdge;
|
|
|
|
+import org.jfree.chart.ui.RectangleInsets;
|
|
import org.jfree.chart.ui.TextAnchor;
|
|
import org.jfree.chart.ui.TextAnchor;
|
|
import org.jfree.data.category.CategoryDataset;
|
|
import org.jfree.data.category.CategoryDataset;
|
|
import org.jfree.data.category.DefaultCategoryDataset;
|
|
import org.jfree.data.category.DefaultCategoryDataset;
|
|
@@ -1438,9 +1439,11 @@ public class FormulaUtils {
|
|
0.0f // 偏移量
|
|
0.0f // 偏移量
|
|
));
|
|
));
|
|
plot.setRenderer(renderer);
|
|
plot.setRenderer(renderer);
|
|
|
|
+ plot.setInsets(new RectangleInsets(0, 0, 0, 0));
|
|
|
|
|
|
// 设置 DateAxis
|
|
// 设置 DateAxis
|
|
DateAxis monthAxis = (DateAxis) plot.getDomainAxis();
|
|
DateAxis monthAxis = (DateAxis) plot.getDomainAxis();
|
|
|
|
+ monthAxis.setTickMarkPosition(DateTickMarkPosition.MIDDLE);
|
|
monthAxis.setDateFormatOverride(new SimpleDateFormat("yyyy年MM月"));
|
|
monthAxis.setDateFormatOverride(new SimpleDateFormat("yyyy年MM月"));
|
|
monthAxis.setTickLabelsVisible(false); // 禁用标签
|
|
monthAxis.setTickLabelsVisible(false); // 禁用标签
|
|
monthAxis.setTickLabelFont(font);
|
|
monthAxis.setTickLabelFont(font);
|
|
@@ -1458,6 +1461,8 @@ public class FormulaUtils {
|
|
rangeAxis.setLabelFont(font);
|
|
rangeAxis.setLabelFont(font);
|
|
rangeAxis.setTickLabelFont(font);
|
|
rangeAxis.setTickLabelFont(font);
|
|
rangeAxis.setVisible(false);
|
|
rangeAxis.setVisible(false);
|
|
|
|
+ rangeAxis.setLabelInsets(new RectangleInsets(0, 0, 0, 0));
|
|
|
|
+ chart.setPadding(new RectangleInsets(0, 0, 0, 0));
|
|
return chart;
|
|
return chart;
|
|
}
|
|
}
|
|
public static void mainT(String[] args) throws IOException {
|
|
public static void mainT(String[] args) throws IOException {
|