Browse Source

Merge pull request #1485 in DESIGN/design from ~QINGHUI.LIU/design:release/10.0 to release/10.0

* commit '2c6a5ba430181fa86522b3d5378eb66b8e518a38':
  加空判断
  CHART-12973 统一试管型仪表盘标签样式
feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
41950a75ae
  1. 8
      designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java

8
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,13 +93,16 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
if(attrLabel == null){
return;
}
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.getAttrLabelDetail().getTextAttr().setFRFont(VanChartGaugePlot.THERMOMETER_VERTICAL_PERCENT_LABEL_FONT);
attrLabel.getGaugeValueLabelDetail().setPosition(Constants.LEFT);
} else {
attrLabel.getAttrLabelDetail().setPosition(Constants.BOTTOM);
attrLabel.getAttrLabelDetail().getTextAttr().setFRFont(VanChartGaugePlot.THERMOMETER_PERCENT_LABEL_FONT);
attrLabel.getGaugeValueLabelDetail().setPosition(Constants.BOTTOM);
}
}

Loading…
Cancel
Save