Browse Source

Pull request #6690: CHART-21951 第三方图表插件无法创建复用组件

Merge in DESIGN/design from ~TOMMY/design:release/10.0 to release/10.0

* commit 'd2c39de9d3229333e467f81c844a3b4886a89eef':
  CHART-21951 第三方图表插件无法创建复用组件
zheng-1641779399395
Tommy 3 years ago
parent
commit
353485f0dd
  1. 21
      designer-realize/src/main/java/com/fr/design/share/effect/EffectItemGroup.java

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

@ -109,15 +109,7 @@ 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);
}
}
@ -127,16 +119,23 @@ public class EffectItemGroup {
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++) {
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), null);
SourceNode plotSourceNode = SourceNodeUtils.createSourceNode(plot, chartCollection.getChartName(index), sourceNode);
initChartPlot(plot, plotSourceNode, false);
}
}
}
private void initChartPlot(Plot plot, SourceNode sourceNode, boolean isSubChart) {

Loading…
Cancel
Save