diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldButton.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldButton.java index 1e76d616cc..a9caac7913 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldButton.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldButton.java @@ -2,11 +2,11 @@ package com.fr.van.chart.designer.component.richText; import com.fr.base.BaseUtils; import com.fr.data.util.function.DataFunction; -import com.fr.data.util.function.NoneFunction; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.plugin.chart.base.FirstFunction; import com.fr.plugin.chart.base.format.AttrTooltipDurationFormat; import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.base.format.IntervalTimeFormat; @@ -40,7 +40,7 @@ public class VanChartFieldButton extends JPanel { private UIToggleButton fieldButton; private UIButton addButton; - private DataFunction dataFunction = new NoneFunction(); + private DataFunction dataFunction = new FirstFunction(); public VanChartFieldButton(String fieldName, AttrTooltipFormat format, VanChartFieldListener listener) { this(fieldName, format, false, false, listener); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java index 69c93926c5..e1b7a79c46 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java @@ -30,6 +30,8 @@ import java.util.Map; public class VanChartRichEditorPane { + private static final String PARAMS_SPLITTER = "|"; + private static final String NAME_SPACE = "Pool"; private static final String VARIABLE = "data"; @@ -163,7 +165,7 @@ public class VanChartRichEditorPane { if (paramsMap != null) { for (Map.Entry entry : paramsMap.entrySet()) { paramsStr.append(entry.getKey()).append(":").append(entry.getValue()); - paramsStr.append("-"); + paramsStr.append(PARAMS_SPLITTER); } } diff --git a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html index f62d7dbb2f..2b7677f5c0 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html +++ b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html @@ -28,7 +28,7 @@ var getDimensionIds = function (params) { var result = []; - var paramGroup = params.split("-"); + var paramGroup = params.split("|"); for (var i = 0, len = paramGroup.length; i < len; i++) { var [key, value] = paramGroup[i].split(":"); @@ -44,7 +44,7 @@ var getInitContent = function (params, initParams, align) { var editorService = BI.Services.getService("bi.service.design.chart.common.editor"); - var paramGroup = params.split("-"); + var paramGroup = params.split("|"); content = "";