diff --git a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java index 95eee394a..5f7e318a7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java +++ b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java @@ -23,11 +23,14 @@ import com.fr.plugin.chart.type.GaugeStyle; * @author shine * @version 10.0 * Created by shine on 2021/10/22 - * vanchart的专门写一个,因为主体代码 新增y轴 组合图新增图表都要用 + * vanchart的抽出来,因为主体代码 新增y轴 组合图新增图表都要用 */ public class DefaultStyleHelper4Van { public static void dealVanPlot4Custom(VanChartPlot plot, CustomPlotType customPlotType) { + if (!ChartEditContext.duchampMode()) { + return; + } dealVanPlotCommonAttr(plot); switch (customPlotType) { case PIE: @@ -55,8 +58,18 @@ public class DefaultStyleHelper4Van { } + public static VanChartAxis dealAxisDefault(VanChartAxis axis) { + if (!ChartEditContext.duchampMode()) { + return axis; + } + axis.getTitle().getTextAttr().setFRFont(DefaultStyleConstants.AXIS_TITLE); + axis.getTextAttr().setFRFont(DefaultStyleConstants.AXIS_LABEL); + axis.setAxisColor(DefaultStyleConstants.AXIS_LINE); + axis.setMainGridColor(DefaultStyleConstants.GRID_LINE); + return axis; + } - public static void dealVanPlotCommonAttr(Plot plot) { + static void dealVanPlotCommonAttr(Plot plot) { if (!ChartEditContext.duchampMode()) { return; } @@ -97,17 +110,6 @@ public class DefaultStyleHelper4Van { } - public static VanChartAxis dealAxisDefault(VanChartAxis axis) { - if (!ChartEditContext.duchampMode()) { - return axis; - } - axis.getTitle().getTextAttr().setFRFont(DefaultStyleConstants.AXIS_TITLE); - axis.getTextAttr().setFRFont(DefaultStyleConstants.AXIS_LABEL); - axis.setAxisColor(DefaultStyleConstants.AXIS_LINE); - axis.setMainGridColor(DefaultStyleConstants.GRID_LINE); - return axis; - } - private static void dealBorder(VanChartPlot vanChartPlot) { ConditionAttr defaultAttr = vanChartPlot.getConditionCollection().getDefaultAttr(); AttrBorder attrBorder = defaultAttr.getExisted(AttrBorder.class);