Browse Source

CHART-14399 坐标轴切换类型时,保留网格线类型和颜色

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
a85a9b3351
  1. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java

6
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java

@ -102,21 +102,21 @@ public class VanChartAxisScrollPaneWithTypeSelect extends AbstractVanChartScroll
if(ComparatorUtils.equals(axis.getAxisType(), AxisType.AXIS_CATEGORY)){
textAxisPane.updateBean(axis);
} else {
axis = new VanChartAxis(axis.getAxisName(), axis.getPosition(), axis.getGridLineType());
axis = new VanChartAxis(axis.getAxisName(), axis.getPosition(), axis.getGridLineType(), axis.getMainGridColor());
textAxisPane.updateBean(axis);
}
} else if(ComparatorUtils.equals(index, AxisType.AXIS_TIME.ordinal())){
if(ComparatorUtils.equals(axis.getAxisType(), AxisType.AXIS_TIME)){
timeAxisPane.updateBean(axis);
} else {
axis = new VanChartTimeAxis(axis.getAxisName(), axis.getPosition(), axis.getGridLineType());
axis = new VanChartTimeAxis(axis.getAxisName(), axis.getPosition(), axis.getGridLineType(), axis.getMainGridColor());
timeAxisPane.updateBean(axis);
}
} else if(ComparatorUtils.equals(index, AxisType.AXIS_VALUE.ordinal())){
if(ComparatorUtils.equals(axis.getAxisType(), AxisType.AXIS_VALUE)){
valueAxisPane.updateBean(axis);
} else {
axis = new VanChartValueAxis(axis.getAxisName(), axis.getPosition(), axis.getGridLineType());
axis = new VanChartValueAxis(axis.getAxisName(), axis.getPosition(), axis.getGridLineType(), axis.getMainGridColor());
valueAxisPane.updateBean(axis);
}
}

Loading…
Cancel
Save