From 41c033b948b7a09d1d0e5cafad27615f8b2ed43f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 22 Sep 2020 16:06:38 +0800 Subject: [PATCH] =?UTF-8?q?CHART-15704=20=E8=AF=95=E7=AE=A1=E5=9E=8B?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E7=9B=98=E6=A0=87=E7=AD=BE=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E7=9A=84=E5=88=9D=E5=A7=8B=E5=8C=96=E6=97=B6=E5=80=99=EF=BC=8C?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E6=8A=8A=E6=89=80=E6=9C=89=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E9=83=BD=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../label/VanChartGaugeCateOrPercentLabelDetailPane.java | 2 +- .../designer/style/label/VanChartGaugeLabelDetailPane.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java index 292dcbfa47..9a5c453828 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java @@ -22,7 +22,7 @@ public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabe } protected double[] getLabelPaneRowSize(Plot plot, double p) { - if (hasLabelAlign(plot)) { + if (hasLabelAlignPane()) { return new double[]{p, p, p, p}; } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java index f06e7c1c7c..0921b6d628 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java @@ -123,7 +123,7 @@ public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane { } protected Component[][] getLabelPaneComponents(Plot plot, double p, double[] columnSize) { - if (hasLabelAlign(plot)) { + if (hasLabelAlignPane()) { return new Component[][]{ new Component[]{getDataLabelContentPane(), null}, @@ -222,6 +222,10 @@ public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane { return getGaugeStyle() == GaugeStyle.THERMOMETER && !((VanChartGaugePlot) plot).getGaugeDetailStyle().isHorizontalLayout(); } + protected boolean hasLabelAlignPane() { + return getGaugeStyle() == GaugeStyle.THERMOMETER; + } + public void populate(AttrLabelDetail detail) { super.populate(detail);