From d8e0cc3511e7d497381e00ea89ffdb7ed2cb9593 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Tue, 13 Oct 2020 18:58:33 +0800 Subject: [PATCH] =?UTF-8?q?CHART-16173=20=E6=9F=B1=E5=BD=A2=E5=9B=BE?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E6=A0=87=E7=AD=BE=E6=97=B6=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E6=96=B9=E5=90=91=E8=B0=83=E6=95=B4=E6=88=90=E6=A8=AA?= =?UTF-8?q?=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../column/VanChartColumnPlotLabelDetailPane.java | 12 ++++++++++-- .../style/label/VanChartPlotLabelDetailPane.java | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java index 7da396c51c..b2035522d2 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java @@ -22,8 +22,16 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa AttrTooltipContent content = detail.getContent(); UIButtonGroup orientation = getOrientation(); - if (orientation != null) { - orientation.setEnabled(content != null && !content.isRichText()); + if (orientation != null && content != null) { + if (content.isRichText()) { + + orientation.setSelectedIndex(HORIZONTAL_INDEX); + detail.setHorizontal(true); + + orientation.setEnabled(false); + } else { + orientation.setEnabled(true); + } } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java index 6f577965b5..1470951976 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java @@ -36,7 +36,7 @@ import java.awt.Component; public class VanChartPlotLabelDetailPane extends BasicPane { private static final long serialVersionUID = -22438250307946275L; - private static final int HORIZONTAL_INDEX = 0; + public static final int HORIZONTAL_INDEX = 0; private BasicBeanPane dataLabelContentPane;