Browse Source

CHART-18057 富文本默认参数和数据集字段重名时,显示默认参数

persist/11.0
Qinghui.Liu 4 years ago
parent
commit
de69e23c95
  1. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

11
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

@ -47,6 +47,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@ -463,9 +464,15 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
private void refreshTableFieldParams(Map<String, String> params) {
List<String> tableFieldNames = VanChartRichEditorPane.getFieldNames();
List<String> defaultParams = Arrays.asList(getRichTextFieldNames());
if (tableFieldNames != null && params != null) {
for (String fieldName : tableFieldNames) {
if (tableFieldNames == null || params == null) {
return;
}
for (String fieldName : tableFieldNames) {
// 富文本默认参数和数据集字段重名时,显示默认参数
if (!defaultParams.contains(fieldName)) {
params.put(fieldName, "${" + fieldName + "_" + fieldName.hashCode() + "}");
}
}

Loading…
Cancel
Save