diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java index 902347fb88..4c1c1b008a 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java @@ -7,7 +7,6 @@ import com.fr.chartx.attr.ChartProvider; import com.fr.common.listener.ManageDsListenerRegisterListener; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.beans.FurtherBasicBeanPane; -import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.tabledata.Prepare4DataSourceChange; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.chart.ChartEditPaneActionListener; @@ -411,7 +410,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare this.addAncestorListener(new ManageDsListenerRegisterListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { AbstractChartAttrPane attrPane = paneList.get(tabsHeaderIconPane.getSelectedIndex()); - if (attrPane.isShowing()) { + if (attrPane.isShowing() && collection != null) { attrPane.refreshChartDataPane(collection); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/data/VanChartMoreCateTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/data/VanChartMoreCateTableDataContentPane.java index dcf160aec1..4d9f0aa61f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/data/VanChartMoreCateTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/data/VanChartMoreCateTableDataContentPane.java @@ -22,13 +22,14 @@ public class VanChartMoreCateTableDataContentPane extends CategoryPlotMoreCateTa @Override public void populateBean(ChartCollection collection) { super.populateBean(collection); - VanChartRectanglePlot plot = (VanChartRectanglePlot) collection.getSelectedChart().getPlot(); + VanChartRectanglePlot plot = collection.getSelectedChart().getPlot(); isSupportMultiCategory = plot.isSupportMultiCategory(); checkBoxList(isSupportMultiCategory); } protected void updateMoreCate(NormalTableDataDefinition normal, Plot plot) { super.updateMoreCate(normal, plot); + isSupportMultiCategory = ((VanChartRectanglePlot) plot).isSupportMultiCategory(); ((VanChartPlot) plot).setCategoryNum(getBoxList().size() + 1); if (!getBoxList().isEmpty()) { plot.getDataSheet().setVisible(false);