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 3243bad71..b32a23c69 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 @@ -1,6 +1,8 @@ package com.fr.van.chart.column; import com.fr.chart.chartattr.Plot; +import com.fr.plugin.chart.base.AttrLabelDetail; +import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.column.VanChartColumnPlot; import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.label.VanChartPlotLabelDetailPane; @@ -14,4 +16,19 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa protected boolean hasLabelOrientationPane() { return !((VanChartColumnPlot) this.getPlot()).isBar(); } + + private void checkOrientationEnable(AttrLabelDetail detail) { + AttrTooltipContent content = detail.getContent(); + getOrientation().setEnabled(content != null && !content.isRichText()); + } + + public void populate(AttrLabelDetail detail) { + super.populate(detail); + checkOrientationEnable(detail); + } + + public void update(AttrLabelDetail detail) { + super.update(detail); + checkOrientationEnable(detail); + } } 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 fd387654e..6f577965b 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 @@ -88,6 +88,10 @@ public class VanChartPlotLabelDetailPane extends BasicPane { return plot; } + public UIButtonGroup getOrientation() { + return orientation; + } + //默认从factory中取 protected void initToolTipContentPane(Plot plot) { dataLabelContentPane = PlotFactory.createPlotLabelContentPane(plot, parent, VanChartPlotLabelDetailPane.this);