Browse Source

REPORT-53592 扩展图表创建共享组件npe问题

feature/10.0
kuangshuai 3 years ago
parent
commit
58364c9503
  1. 10
      designer-realize/src/main/java/com/fr/design/share/effect/EffectItemGroup.java

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

@ -111,8 +111,11 @@ public class EffectItemGroup {
ChartCollection chartCollection = (ChartCollection) value;
for (int index = 0; index < chartCollection.getChartCount(); index++) {
Chart chart= (Chart) chartCollection.getChart(index, ChartProvider.class);
SourceNode chartSourceNode = SourceNodeUtils.createSourceNode(chart.getPlot(), chartCollection.getChartName(index), cellSourceNode);
Plot plot = chart.getPlot();
if (plot == null) {
break;
}
SourceNode chartSourceNode = SourceNodeUtils.createSourceNode(plot, chartCollection.getChartName(index), cellSourceNode);
initChartPlot(plot, chartSourceNode, false);
}
@ -126,8 +129,11 @@ public class EffectItemGroup {
ChartCollection chartCollection = (ChartCollection) editor.getChartCollection();
for (int index = 0; index < chartCollection.getChartCount(); index++) {
Chart chart= (Chart) chartCollection.getChart(index, ChartProvider.class);
SourceNode plotSourceNode = SourceNodeUtils.createSourceNode(chart.getPlot(), chartCollection.getChartName(index), null);
Plot plot = chart.getPlot();
if (plot == null) {
break;
}
SourceNode plotSourceNode = SourceNodeUtils.createSourceNode(plot, chartCollection.getChartName(index), null);
initChartPlot(plot, plotSourceNode, false);
}

Loading…
Cancel
Save