Browse Source

Merge pull request #6658 in DESIGN/design from final/11.0 to release/11.0

* commit '8210e014ece5d8243f5fed1d582385e08fbe7002':
  CHART-21844 fix:悬浮窗图表 属性也要全部设置成自定义
  CHART-21844 fix:折线雷达图切换到堆积雷达图&组合图新增图表 属性也要全部设置成自定义
bugfix/11.0
superman 3 years ago
parent
commit
050e9471c4
  1. 11
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java
  2. 17
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java
  3. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java

11
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java

@ -12,8 +12,10 @@ import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.hyperlink.AbstractHyperLinkPane; import com.fr.design.hyperlink.AbstractHyperLinkPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.chart.ChartHyperEditPane; import com.fr.design.mainframe.chart.ChartHyperEditPane;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.vanchart.VanChart;
import java.util.HashMap; import java.util.HashMap;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -70,7 +72,14 @@ public class ChartHyperPoplinkPane extends AbstractHyperLinkPane<ChartHyperPopli
ChartProvider chart = ChartTypeManager.getInstanceWithCheck().getFirstChart(); ChartProvider chart = ChartTypeManager.getInstanceWithCheck().getFirstChart();
if (chart != null) { if (chart != null) {
try { try {
cc.addChart((ChartProvider) chart.clone()); ChartProvider clone = (ChartProvider) chart.clone();
if (!ChartEditContext.supportTheme() && clone instanceof VanChart) {
//主题中有的属性 界面上屏蔽不跟随主题 属性全部设置成自定义
((VanChart) clone).setThemeCustom();
// //主题中没有的 根据主题深浅色自动 的属性 默认自动
// ((VanChart) chart4Update).setAutoThemeCustom();
}
cc.addChart(clone);
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }

17
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java

@ -1,9 +1,11 @@
package com.fr.van.chart.custom.component; package com.fr.van.chart.custom.component;
import com.fr.chart.base.ChartThemeStyleProvider;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
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.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
@ -265,6 +267,13 @@ public class VanChartCustomPlotSelectPane extends BasicBeanPane<Chart> {
//设置公共属性 //设置公共属性
setCommonAttr(vanChartPlot, customPlot); setCommonAttr(vanChartPlot, customPlot);
if (!ChartEditContext.supportTheme()) {
//主题中有的属性 界面上屏蔽不跟随主题 属性全部设置成自定义
setThemeCustom(vanChartPlot);
// //主题中没有的 根据主题深浅色自动 的属性 默认自动
// ((VanChart) chart4Update).setAutoThemeCustom();
}
newCustomPlotList.add(vanChartPlot); newCustomPlotList.add(vanChartPlot);
} }
} }
@ -272,6 +281,14 @@ public class VanChartCustomPlotSelectPane extends BasicBeanPane<Chart> {
customPlot.setCustomPlotList(newCustomPlotList); customPlot.setCustomPlotList(newCustomPlotList);
} }
private void setThemeCustom(VanChartPlot customPlot) {
List<ChartThemeStyleProvider> chartThemeStyleProviders = new ArrayList<>();
customPlot.getChartPreStyleProvider(chartThemeStyleProviders);
for (ChartThemeStyleProvider chartThemeStyleProvider : chartThemeStyleProviders) {
chartThemeStyleProvider.setThemeCustom();
}
}
private void setCommonAttr(VanChartPlot vanChartPlot, VanChartCustomPlot customPlot) { private void setCommonAttr(VanChartPlot vanChartPlot, VanChartCustomPlot customPlot) {
//坐标轴公共属性 //坐标轴公共属性
dealAxisAttr(vanChartPlot, customPlot); dealAxisAttr(vanChartPlot, customPlot);

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

@ -145,6 +145,12 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Van
chart.setPlot(cloneOldPlot2New(oldPlot, newPlot)); chart.setPlot(cloneOldPlot2New(oldPlot, newPlot));
resetChartAttr4SamePlot(chart); resetChartAttr4SamePlot(chart);
ChartInfoCollector.getInstance().updateChartMiniType(chart); ChartInfoCollector.getInstance().updateChartMiniType(chart);
if (!ChartEditContext.supportTheme()) {
//主题中有的属性 界面上屏蔽不跟随主题 属性全部设置成自定义
chart.setThemeCustom();
// //主题中没有的 根据主题深浅色自动 的属性 默认自动
// ((VanChart) chart4Update).setAutoThemeCustom();
}
} else if (!samePlot) { } else if (!samePlot) {
//不同的图表类型切換 //不同的图表类型切換
resetChartAttr(chart, newPlot); resetChartAttr(chart, newPlot);

Loading…
Cancel
Save