From d23640845ad96181e781ca69fd4af053369c9f7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Mon, 17 Aug 2020 08:59:02 +0800 Subject: [PATCH] =?UTF-8?q?CHART-15112=20=E5=88=BB=E5=BA=A6=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/designer/style/axis/VanChartTimeAxisPane.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java index 212e8b1fa..69a326ac4 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java @@ -162,8 +162,10 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane { JPanel mainTickPane = new JPanel(); mainTickPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); - mainUnitField.setPreferredSize(new Dimension(80,20)); - secondUnitField.setPreferredSize(new Dimension(80,20)); + + int width = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH - (int) Math.ceil(mainType.getPreferredSize().getWidth()); + mainUnitField.setPreferredSize(new Dimension(width,20)); + secondUnitField.setPreferredSize(new Dimension(width,20)); mainTickPane.add(mainUnitField); mainTickPane.add(mainType);