Browse Source

CHART-21829 fix:fvs.cpt.chart 图表切换 也要重置图表属性

new-design
shine 3 years ago
parent
commit
740c525977
  1. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  2. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java

7
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -18,6 +18,7 @@ import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.ChartTypePane.ComboBoxPane; import com.fr.design.mainframe.chart.gui.ChartTypePane.ComboBoxPane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
@ -154,6 +155,12 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
addButton.addActionListener((e) -> { addButton.addActionListener((e) -> {
String name = getNewChartName(); String name = getNewChartName();
ChartProvider chart = getChangeStateNewChart(); ChartProvider chart = getChangeStateNewChart();
if (!ChartEditContext.supportTheme() && chart instanceof VanChart) {
//主题中有的属性 界面上屏蔽不跟随主题 属性全部设置成自定义
((VanChart) chart).setThemeCustom();
// //主题中没有的 根据主题深浅色自动 的属性 默认自动
// ((VanChart) chart4Update).setAutoThemeCustom();
}
checkInForm(chart); checkInForm(chart);
addNewChart(chart, name, editingCollection.getChartCount()); addNewChart(chart, name, editingCollection.getChartCount());
}); });

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

@ -152,10 +152,13 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Van
newPlot.setCategoryNum(oldPlot.getCategoryNum()); newPlot.setCategoryNum(oldPlot.getCategoryNum());
//切换类型埋点 //切换类型埋点
ChartInfoCollector.getInstance().updateChartTypeTime(chart, oldPlot.getPlotID()); ChartInfoCollector.getInstance().updateChartTypeTime(chart, oldPlot.getPlotID());
if (!ChartEditContext.supportTheme()) {
//主题中有的属性 界面上屏蔽不跟随主题 属性全部设置成自定义
chart.setThemeCustom();
// //主题中没有的 根据主题深浅色自动 的属性 默认自动
// ((VanChart) chart4Update).setAutoThemeCustom();
}
} }
// if (!ChartEditContext.supportTheme()) {
// chart.setAutoThemeCustom();
// }
if (!acceptDefinition(chart.getChartDataDefinition(), newPlot)) { if (!acceptDefinition(chart.getChartDataDefinition(), newPlot)) {
chart.setChartDataDefinition(null); chart.setChartDataDefinition(null);
} }

Loading…
Cancel
Save