From 9ce28c7b1cdefa8707cb944ad84c9ca7e85c4ae6 Mon Sep 17 00:00:00 2001 From: shine Date: Wed, 25 Sep 2019 18:52:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E6=95=B0=E6=8D=AE=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=20reset=E4=B8=80=E4=BA=9B=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/VanChartInteractivePane.java | 41 +++++++++++++++++++ .../VanChartAbstractPlotSeriesPane.java | 14 ------- 2 files changed, 41 insertions(+), 14 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java index c26f90bc1..04b91b439 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java @@ -2,6 +2,8 @@ package com.fr.van.chart.designer.other; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartglyph.ConditionAttr; +import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chartx.attr.LargeDataAttribute; import com.fr.chartx.attr.LargeDataModeType; import com.fr.design.gui.ibutton.UIButtonGroup; @@ -17,8 +19,13 @@ import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; import com.fr.plugin.chart.axis.type.AxisPlotType; +import com.fr.plugin.chart.base.AttrEffect; +import com.fr.plugin.chart.base.AttrLabel; import com.fr.plugin.chart.base.RefreshMoreLabel; +import com.fr.plugin.chart.base.VanChartAttrMarker; import com.fr.plugin.chart.base.VanChartTools; +import com.fr.plugin.chart.map.line.condition.AttrLineEffect; +import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel; import com.fr.plugin.chart.vanchart.VanChart; import com.fr.van.chart.custom.component.VanChartHyperLinkPane; import com.fr.van.chart.designer.AbstractVanChartScrollPane; @@ -229,6 +236,40 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { private void checkLargeDataMode() { largeModeThresholdNumberPane.setVisible(largeDataMode.getSelectedItem() == LargeDataModeType.OPEN_BEYOND_THRESHOLD); + + resetAttr(); + } + + private void resetAttr() { + if (largeDataMode.getSelectedItem() == LargeDataModeType.OPEN_BEYOND_THRESHOLD) { + VanChartPlot plot = this.chart.getPlot(); + + AttrLabel attrLabel = plot.getAttrLabelFromConditionCollection(); + if (attrLabel == null) { + attrLabel = plot.getDefaultAttrLabel(); + ConditionAttr defaultAttr = plot.getConditionCollection().getDefaultAttr(); + defaultAttr.addDataSeriesCondition(attrLabel); + } + attrLabel.setEnable(false); + + resetCustomCondition(plot.getConditionCollection()); + } + } + + + private void resetCustomCondition(ConditionCollection conditionCollection) { + for (int i = 0, len = conditionCollection.getConditionAttrSize(); i < len; i++) { + ConditionAttr conditionAttr = conditionCollection.getConditionAttr(i); + conditionAttr.remove(AttrLabel.class); + conditionAttr.remove(ScatterAttrLabel.class); + conditionAttr.remove(AttrEffect.class); + conditionAttr.remove(AttrLineEffect.class); + + VanChartAttrMarker attrMarker = conditionAttr.getExisted(VanChartAttrMarker.class); + if (attrMarker != null && !attrMarker.isCommon()) { + conditionAttr.remove(VanChartAttrMarker.class); + } + } } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java index 1b9d15ea6..6dfc4f6f3 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java @@ -177,20 +177,6 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP return PlotFactory.largeDataModel(plot); } - protected void resetCustomCondition(ConditionCollection conditionCollection) { - for (int i = 0, len = conditionCollection.getConditionAttrSize(); i < len; i++) { - ConditionAttr conditionAttr = conditionCollection.getConditionAttr(i); - conditionAttr.remove(AttrLabel.class); - conditionAttr.remove(ScatterAttrLabel.class); - conditionAttr.remove(AttrEffect.class); - conditionAttr.remove(AttrLineEffect.class); - - VanChartAttrMarker attrMarker = conditionAttr.getExisted(VanChartAttrMarker.class); - if (attrMarker != null && !attrMarker.isCommon()) { - conditionAttr.remove(VanChartAttrMarker.class); - } - } - } protected RadiusCardLayoutPane initRadiusPane() { return new RadiusCardLayoutPane();