Browse Source

CHART-11093 按特定数据类型切换数据面板

research/11.0
Wim.Zhai 5 years ago
parent
commit
dc7a1d2be8
  1. 11
      designer-chart/src/main/java/com/fr/van/chart/multilayer/MultiPieIndependentVanChartInterface.java

11
designer-chart/src/main/java/com/fr/van/chart/multilayer/MultiPieIndependentVanChartInterface.java

@ -1,6 +1,8 @@
package com.fr.van.chart.multilayer; package com.fr.van.chart.multilayer;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.field.diff.MultiPieColumnFieldCollection;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.AbstractVanSingleDataPane; import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.MultiPieCellDataFieldsPane; import com.fr.design.chartx.fields.diff.MultiPieCellDataFieldsPane;
@ -45,6 +47,15 @@ public class MultiPieIndependentVanChartInterface extends AbstractIndependentVan
@Override @Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) { public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) { return new AbstractVanSingleDataPane(listener) {
@Override
protected void populate(AbstractDataDefinition dataDefinition) {
if (!(dataDefinition.getColumnFieldCollection() instanceof MultiPieColumnFieldCollection)) {
dataDefinition.setColumnFieldCollection(new MultiPieColumnFieldCollection());
}
super.populate(dataDefinition);
}
@Override @Override
protected SingleDataPane createSingleDataPane() { protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new MultiPieDataSetFieldsPane(), new MultiPieCellDataFieldsPane()); return new SingleDataPane(new MultiPieDataSetFieldsPane(), new MultiPieCellDataFieldsPane());

Loading…
Cancel
Save