Browse Source

for duchamp mode

zheng-1641779399395
shine 3 years ago
parent
commit
283fddcfb2
  1. 28
      designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java

28
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 * @author shine
* @version 10.0 * @version 10.0
* Created by shine on 2021/10/22 * Created by shine on 2021/10/22
* vanchart的专门写一个因为主体代码 新增y轴 组合图新增图表都要用 * vanchart的抽出来因为主体代码 新增y轴 组合图新增图表都要用
*/ */
public class DefaultStyleHelper4Van { public class DefaultStyleHelper4Van {
public static void dealVanPlot4Custom(VanChartPlot plot, CustomPlotType customPlotType) { public static void dealVanPlot4Custom(VanChartPlot plot, CustomPlotType customPlotType) {
if (!ChartEditContext.duchampMode()) {
return;
}
dealVanPlotCommonAttr(plot); dealVanPlotCommonAttr(plot);
switch (customPlotType) { switch (customPlotType) {
case PIE: 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()) { if (!ChartEditContext.duchampMode()) {
return; 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) { private static void dealBorder(VanChartPlot vanChartPlot) {
ConditionAttr defaultAttr = vanChartPlot.getConditionCollection().getDefaultAttr(); ConditionAttr defaultAttr = vanChartPlot.getConditionCollection().getDefaultAttr();
AttrBorder attrBorder = defaultAttr.getExisted(AttrBorder.class); AttrBorder attrBorder = defaultAttr.getExisted(AttrBorder.class);

Loading…
Cancel
Save