|
|
|
@ -1,10 +1,13 @@
|
|
|
|
|
package com.fr.van.chart.designer.type; |
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
|
import com.fr.base.chart.chartdata.TopDefinitionProvider; |
|
|
|
|
import com.fr.chart.base.AttrFillStyle; |
|
|
|
|
import com.fr.chart.chartattr.Chart; |
|
|
|
|
import com.fr.chart.chartattr.Legend; |
|
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
|
import com.fr.chart.chartdata.NormalReportDataDefinition; |
|
|
|
|
import com.fr.chart.chartdata.NormalTableDataDefinition; |
|
|
|
|
import com.fr.chart.chartglyph.ConditionAttr; |
|
|
|
|
import com.fr.chart.chartglyph.ConditionCollection; |
|
|
|
|
import com.fr.chart.chartglyph.DataSheet; |
|
|
|
@ -167,6 +170,7 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Van
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void resetChartAttr(VanChart chart, VanChartPlot newPlot) { |
|
|
|
|
resetFilterDefinition(chart); |
|
|
|
|
//上个图表支持继承部分属性到新图表
|
|
|
|
|
if (supportExtendAttr(chart)) { |
|
|
|
|
newPlot.extendAttribute(chart); |
|
|
|
@ -186,8 +190,6 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Van
|
|
|
|
|
resetTitleAttr(chart); |
|
|
|
|
//重置监控刷新选项
|
|
|
|
|
resetRefreshMoreLabelAttr(chart); |
|
|
|
|
resetFilterDefinition(chart); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//是否支持属性的继承
|
|
|
|
@ -290,4 +292,17 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Van
|
|
|
|
|
autoButton.addActionListener(autoButtonListener); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//部分图表继承到多分类之后会报错
|
|
|
|
|
protected void resetMoreCateDefinition(Chart chart) { |
|
|
|
|
TopDefinitionProvider filterDefinition = chart.getFilterDefinition(); |
|
|
|
|
if (filterDefinition instanceof NormalTableDataDefinition) { |
|
|
|
|
((NormalTableDataDefinition) filterDefinition).clearMoreCate(); |
|
|
|
|
((VanChartPlot) chart.getPlot()).setCategoryNum(1); |
|
|
|
|
} |
|
|
|
|
if (filterDefinition instanceof NormalReportDataDefinition) { |
|
|
|
|
((NormalReportDataDefinition) filterDefinition).clearMoreCate(); |
|
|
|
|
((VanChartPlot) chart.getPlot()).setCategoryNum(1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |