From 2c6a5ba430181fa86522b3d5378eb66b8e518a38 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 12 Mar 2020 14:30:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E7=A9=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java index 9c16fa961b..ff6a62f921 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java @@ -17,6 +17,7 @@ import com.fr.design.i18n.Toolkit; import com.fr.plugin.chart.attr.GaugeDetailStyle; import com.fr.plugin.chart.base.AttrLabel; +import com.fr.plugin.chart.base.AttrLabelDetail; import com.fr.plugin.chart.gauge.VanChartGaugePlot; import com.fr.plugin.chart.type.GaugeStyle; import com.fr.stable.Constants; @@ -92,7 +93,11 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { if(attrLabel == null){ return; } - attrLabel.getAttrLabelDetail().getTextAttr().setFRFont(VanChartGaugePlot.THERMOMETER_LABEL_FONT); + AttrLabelDetail attrLabelDetail = attrLabel.getAttrLabelDetail(); + if(attrLabelDetail == null || attrLabelDetail.getTextAttr() == null){ + return; + } + attrLabelDetail.getTextAttr().setFRFont(VanChartGaugePlot.THERMOMETER_LABEL_FONT); if(gaugeLayout.getSelectedIndex() == 0){ attrLabel.getAttrLabelDetail().setPosition(Constants.LEFT); attrLabel.getGaugeValueLabelDetail().setPosition(Constants.LEFT);