Browse Source

Merge pull request #6701 in DESIGN/design from release/11.0 to feature/x

* commit '233336dfc59b05a430cd20b1a6e9abe3a6863af0':
  CHART-21951 第三方图表插件无法创建复用组件
  CHART-21951 第三方图表插件无法创建复用组件
feature/x
superman 3 years ago
parent
commit
b6634637cd
  1. 32
      designer-realize/src/main/java/com/fr/design/share/effect/EffectItemGroup.java

32
designer-realize/src/main/java/com/fr/design/share/effect/EffectItemGroup.java

@ -109,34 +109,30 @@ public class EffectItemGroup {
Object value = cellElement.getValue();
if (value instanceof ChartCollection) {
ChartCollection chartCollection = (ChartCollection) value;
for (int index = 0; index < chartCollection.getChartCount(); index++) {
Chart chart= (Chart) chartCollection.getChart(index, ChartProvider.class);
Plot plot = chart.getPlot();
if (plot == null) {
continue;
}
SourceNode chartSourceNode = SourceNodeUtils.createSourceNode(plot, chartCollection.getChartName(index), cellSourceNode);
initChartPlot(plot, chartSourceNode, false);
}
initChartEditorByChartCollection(chartCollection, cellSourceNode);
}
}
}
private void initChartEditor() {
ChartEditor editor = (ChartEditor) this.widget;
ChartCollection chartCollection = (ChartCollection) editor.getChartCollection();
initChartEditorByChartCollection(chartCollection, null);
}
private void initChartEditorByChartCollection(ChartCollection chartCollection, SourceNode sourceNode) {
for (int index = 0; index < chartCollection.getChartCount(); index++) {
Chart chart= (Chart) chartCollection.getChart(index, ChartProvider.class);
Plot plot = chart.getPlot();
if (plot == null) {
continue;
ChartProvider chartProvider = chartCollection.getChart(index, ChartProvider.class);
if (chartProvider instanceof Chart) {
Chart chart= (Chart) chartCollection.getChart(index, ChartProvider.class);
Plot plot = chart.getPlot();
if (plot == null) {
continue;
}
SourceNode plotSourceNode = SourceNodeUtils.createSourceNode(plot, chartCollection.getChartName(index), sourceNode);
initChartPlot(plot, plotSourceNode, false);
}
SourceNode plotSourceNode = SourceNodeUtils.createSourceNode(plot, chartCollection.getChartName(index), null);
initChartPlot(plot, plotSourceNode, false);
}
}
private void initChartPlot(Plot plot, SourceNode sourceNode, boolean isSubChart) {

Loading…
Cancel
Save