Browse Source

CHART-11810

research/11.0
白岳 5 years ago
parent
commit
7a0154ca96
  1. 21
      designer-chart/src/main/java/com/fr/van/chart/bubble/VanChartBubblePlotPane.java
  2. 7
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java
  3. 14
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java
  4. 8
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/type/VanChartDrillMapPlotPane.java
  5. 14
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/type/VanChartFunnelTypePane.java
  6. 8
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/type/VanChartGanttPlotPane.java
  7. 26
      designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugePlotPane.java
  8. 7
      designer-chart/src/main/java/com/fr/van/chart/heatmap/designer/type/VanChartHeatMapTypePane.java
  9. 8
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java
  10. 15
      designer-chart/src/main/java/com/fr/van/chart/multilayer/VanChartMultiPiePlotPane.java
  11. 14
      designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterPlotPane.java
  12. 13
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/type/VanChartStructureTypePane.java
  13. 14
      designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/type/VanChartWordCloudTypePane.java

21
designer-chart/src/main/java/com/fr/van/chart/bubble/VanChartBubblePlotPane.java

@ -7,7 +7,13 @@ import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.chartx.attr.ZoomAttribute; import com.fr.chartx.attr.ZoomAttribute;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.diff.BubbleColumnFieldCollection;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.bubble.BubbleIndependentVanChart; import com.fr.plugin.chart.bubble.BubbleIndependentVanChart;
import com.fr.plugin.chart.bubble.VanChartBubblePlot; import com.fr.plugin.chart.bubble.VanChartBubblePlot;
@ -112,6 +118,7 @@ public class VanChartBubblePlotPane extends AbstractVanChartTypePane {
/** /**
* 气泡图相同图表类型之间切换的时候chart的部分属性也需要重置 * 气泡图相同图表类型之间切换的时候chart的部分属性也需要重置
*
* @param chart * @param chart
*/ */
@Override @Override
@ -120,4 +127,18 @@ public class VanChartBubblePlotPane extends AbstractVanChartTypePane {
//重置监控刷新选项 //重置监控刷新选项
resetRefreshMoreLabelAttr((VanChart) chart); resetRefreshMoreLabelAttr((VanChart) chart);
} }
@Override
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
if (definition instanceof AbstractDataDefinition) {
AbstractColumnFieldCollection columnFieldCollection = ((AbstractDataDefinition) definition).getColumnFieldCollection();
boolean isForce = ((VanChartBubblePlot) vanChartPlot).isForceBubble();
if (isForce) {
return columnFieldCollection instanceof MultiCategoryColumnFieldCollection;
}
return columnFieldCollection instanceof BubbleColumnFieldCollection;
}
return false;
}
} }

7
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java

@ -7,11 +7,13 @@ import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.chartx.data.AbstractDataDefinition; import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.CustomChartDataDefinition; import com.fr.chartx.data.CustomChartDataDefinition;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartAttrLine; import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.custom.CustomDefinition; import com.fr.plugin.chart.custom.CustomDefinition;
@ -295,4 +297,9 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
} }
} }
} }
@Override
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
return definition instanceof CustomDefinition;
}
} }

14
designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java

@ -8,6 +8,10 @@ import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.chart.chartglyph.DataSheet; import com.fr.chart.chartglyph.DataSheet;
import com.fr.chartx.attr.ZoomAttribute; import com.fr.chartx.attr.ZoomAttribute;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection;
import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.MultilineLabel; import com.fr.design.gui.ilable.MultilineLabel;
@ -108,11 +112,19 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Cha
} }
if(chart instanceof VanChart if(chart instanceof VanChart
&& oldPlot.getDefinitionType()!=newPlot.getDefinitionType()) { && !acceptDefinition(((VanChart) chart).getChartDataDefinition(), newPlot)) {
((VanChart) chart).setChartDataDefinition(null); ((VanChart) chart).setChartDataDefinition(null);
} }
} }
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
if(definition instanceof AbstractDataDefinition) {
AbstractColumnFieldCollection columnFieldCollection = ((AbstractDataDefinition) definition).getColumnFieldCollection();
return columnFieldCollection instanceof MultiCategoryColumnFieldCollection;
}
return false;
}
protected void resetChartAttr4SamePlot(Chart chart){ protected void resetChartAttr4SamePlot(Chart chart){
resetRefreshMoreLabelAttr((VanChart) chart); resetRefreshMoreLabelAttr((VanChart) chart);
} }

8
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/type/VanChartDrillMapPlotPane.java

@ -2,9 +2,12 @@ package com.fr.van.chart.drillmap.designer.type;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.drillmap.DrillMapIndependentVanChart; import com.fr.plugin.chart.drillmap.DrillMapIndependentVanChart;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import com.fr.plugin.chart.drillmap.data.DrillMapDefinition;
import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.type.ZoomLevel; import com.fr.plugin.chart.type.ZoomLevel;
import com.fr.van.chart.map.designer.type.VanChartMapPlotPane; import com.fr.van.chart.map.designer.type.VanChartMapPlotPane;
@ -66,4 +69,9 @@ public class VanChartDrillMapPlotPane extends VanChartMapPlotPane {
drillMapPlot.setLayerLevelList(new ArrayList<ZoomLevel>()); drillMapPlot.setLayerLevelList(new ArrayList<ZoomLevel>());
drillMapPlot.setLayerMapTypeList(new ArrayList<MapType>()); drillMapPlot.setLayerMapTypeList(new ArrayList<MapType>());
} }
@Override
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
return definition instanceof DrillMapDefinition;
}
} }

14
designer-chart/src/main/java/com/fr/van/chart/funnel/designer/type/VanChartFunnelTypePane.java

@ -2,7 +2,12 @@ package com.fr.van.chart.funnel.designer.type;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.diff.ColumnFieldCollectionWithSeriesValue;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.funnel.FunnelIndependentVanChart; import com.fr.plugin.chart.funnel.FunnelIndependentVanChart;
import com.fr.plugin.chart.funnel.VanChartFunnelPlot; import com.fr.plugin.chart.funnel.VanChartFunnelPlot;
@ -43,4 +48,13 @@ public class VanChartFunnelTypePane extends AbstractVanChartTypePane {
public Chart getDefaultChart() { public Chart getDefaultChart() {
return FunnelIndependentVanChart.FunnelVanChartTypes[0]; return FunnelIndependentVanChart.FunnelVanChartTypes[0];
} }
@Override
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
if (definition instanceof AbstractDataDefinition) {
AbstractColumnFieldCollection columnFieldCollection = ((AbstractDataDefinition) definition).getColumnFieldCollection();
return columnFieldCollection.getClass().equals(ColumnFieldCollectionWithSeriesValue.class);
}
return false;
}
} }

8
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/type/VanChartGanttPlotPane.java

@ -2,7 +2,10 @@ package com.fr.van.chart.gantt.designer.type;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.GanttChartDataDefinition;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.gantt.GanttIndependentVanChart; import com.fr.plugin.chart.gantt.GanttIndependentVanChart;
import com.fr.plugin.chart.gantt.VanChartGanttPlot; import com.fr.plugin.chart.gantt.VanChartGanttPlot;
import com.fr.van.chart.designer.type.AbstractVanChartTypePane; import com.fr.van.chart.designer.type.AbstractVanChartTypePane;
@ -33,4 +36,9 @@ public class VanChartGanttPlotPane extends AbstractVanChartTypePane {
} }
return cloned; return cloned;
} }
@Override
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
return definition instanceof GanttChartDataDefinition;
}
} }

26
designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugePlotPane.java

@ -2,9 +2,16 @@ package com.fr.van.chart.gauge;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.diff.GaugeColumnFieldCollection;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.gauge.GaugeIndependentVanChart; import com.fr.plugin.chart.gauge.GaugeIndependentVanChart;
import com.fr.plugin.chart.gauge.VanChartGaugePlot; import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.van.chart.designer.type.AbstractVanChartTypePane; import com.fr.van.chart.designer.type.AbstractVanChartTypePane;
/** /**
@ -73,4 +80,23 @@ public class VanChartGaugePlotPane extends AbstractVanChartTypePane {
} }
} }
} }
@Override
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
if(definition instanceof AbstractDataDefinition) {
AbstractColumnFieldCollection columnFieldCollection = ((AbstractDataDefinition) definition).getColumnFieldCollection();
GaugeStyle gaugeStyle = ((VanChartGaugePlot) vanChartPlot).getGaugeStyle();
switch (gaugeStyle) {
case RING:
case SLOT:
case THERMOMETER:
return columnFieldCollection instanceof GaugeColumnFieldCollection;
case POINTER:
case POINTER_SEMI:
default:
return columnFieldCollection instanceof MultiCategoryColumnFieldCollection;
}
}
return false;
}
} }

7
designer-chart/src/main/java/com/fr/van/chart/heatmap/designer/type/VanChartHeatMapTypePane.java

@ -2,8 +2,10 @@ package com.fr.van.chart.heatmap.designer.type;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.heatmap.HeatMapIndependentVanChart; import com.fr.plugin.chart.heatmap.HeatMapIndependentVanChart;
import com.fr.plugin.chart.heatmap.VanChartHeatMapPlot; import com.fr.plugin.chart.heatmap.VanChartHeatMapPlot;
@ -70,4 +72,9 @@ public class VanChartHeatMapTypePane extends VanChartMapPlotPane {
public Chart getDefaultChart() { public Chart getDefaultChart() {
return HeatMapIndependentVanChart.HeatMapVanCharts[0]; return HeatMapIndependentVanChart.HeatMapVanCharts[0];
} }
@Override
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
return false;
}
} }

8
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java

@ -2,9 +2,12 @@ package com.fr.van.chart.map.designer.type;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.MapChartDataDefinition;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.map.MapIndependentVanChart; import com.fr.plugin.chart.map.MapIndependentVanChart;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
@ -89,6 +92,7 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane {
/** /**
* 不同地图类型的超链不需要复制 * 不同地图类型的超链不需要复制
*
* @param oldPlot * @param oldPlot
* @param newPlot * @param newPlot
* @throws CloneNotSupportedException * @throws CloneNotSupportedException
@ -146,4 +150,8 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane {
return this.sourceChoosePane; return this.sourceChoosePane;
} }
@Override
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
return definition instanceof MapChartDataDefinition;
}
} }

15
designer-chart/src/main/java/com/fr/van/chart/multilayer/VanChartMultiPiePlotPane.java

@ -2,7 +2,12 @@ package com.fr.van.chart.multilayer;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.diff.MultiPieColumnFieldCollection;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.multilayer.MultiPieIndependentVanChart; import com.fr.plugin.chart.multilayer.MultiPieIndependentVanChart;
import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot; import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot;
@ -43,6 +48,7 @@ public class VanChartMultiPiePlotPane extends AbstractVanChartTypePane {
/** /**
* 防止新建其他图表从而切换很卡 * 防止新建其他图表从而切换很卡
*
* @return * @return
*/ */
public Chart getDefaultChart() { public Chart getDefaultChart() {
@ -59,4 +65,13 @@ public class VanChartMultiPiePlotPane extends AbstractVanChartTypePane {
tools.setExport(false); tools.setExport(false);
} }
} }
@Override
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
if (definition instanceof AbstractDataDefinition) {
AbstractColumnFieldCollection columnFieldCollection = ((AbstractDataDefinition) definition).getColumnFieldCollection();
return columnFieldCollection instanceof MultiPieColumnFieldCollection;
}
return false;
}
} }

14
designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterPlotPane.java

@ -5,7 +5,12 @@ import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.diff.BubbleColumnFieldCollection;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartAttrLine; import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.scatter.ScatterIndependentVanChart; import com.fr.plugin.chart.scatter.ScatterIndependentVanChart;
@ -81,4 +86,13 @@ public class VanChartScatterPlotPane extends AbstractVanChartTypePane {
} }
} }
} }
@Override
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
if(definition instanceof AbstractDataDefinition) {
AbstractColumnFieldCollection columnFieldCollection = ((AbstractDataDefinition) definition).getColumnFieldCollection();
return columnFieldCollection instanceof BubbleColumnFieldCollection;
}
return false;
}
} }

13
designer-chart/src/main/java/com/fr/van/chart/structure/desinger/type/VanChartStructureTypePane.java

@ -2,7 +2,12 @@ package com.fr.van.chart.structure.desinger.type;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.diff.StructureColumnFieldCollection;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.structure.StructureIndependentVanChart; import com.fr.plugin.chart.structure.StructureIndependentVanChart;
import com.fr.plugin.chart.structure.VanChartStructurePlot; import com.fr.plugin.chart.structure.VanChartStructurePlot;
@ -54,4 +59,12 @@ public class VanChartStructureTypePane extends AbstractVanChartTypePane {
return WordCloudIndependentVanChart.WordCloudVanCharts[0]; return WordCloudIndependentVanChart.WordCloudVanCharts[0];
} }
@Override
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
if(definition instanceof AbstractDataDefinition) {
AbstractColumnFieldCollection columnFieldCollection = ((AbstractDataDefinition) definition).getColumnFieldCollection();
return columnFieldCollection instanceof StructureColumnFieldCollection;
}
return false;
}
} }

14
designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/type/VanChartWordCloudTypePane.java

@ -2,7 +2,12 @@ package com.fr.van.chart.wordcloud.designer.type;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.diff.WordCloudColumnFieldCollection;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot; import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot;
import com.fr.plugin.chart.wordcloud.WordCloudIndependentVanChart; import com.fr.plugin.chart.wordcloud.WordCloudIndependentVanChart;
@ -63,4 +68,13 @@ public class VanChartWordCloudTypePane extends AbstractVanChartTypePane {
public Chart getDefaultChart() { public Chart getDefaultChart() {
return WordCloudIndependentVanChart.WordCloudVanCharts[0]; return WordCloudIndependentVanChart.WordCloudVanCharts[0];
} }
@Override
protected boolean acceptDefinition(ChartDataDefinitionProvider definition, VanChartPlot vanChartPlot) {
if(definition instanceof AbstractDataDefinition) {
AbstractColumnFieldCollection columnFieldCollection = ((AbstractDataDefinition) definition).getColumnFieldCollection();
return columnFieldCollection instanceof WordCloudColumnFieldCollection;
}
return false;
}
} }

Loading…
Cancel
Save