Browse Source

CHART-18257 支持组合图的富文本新增字段参数

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
8477071a6e
  1. 12
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

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

@ -384,7 +384,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
private void fireRichEditor() {
AttrTooltipRichText richText = this.richTextTooltipContent.getRichTextAttr();
refreshTableFieldParams(richText.getParams());
ModernUIPane<VanChartRichEditorModel> richEditorPane = VanChartRichEditorPane.createRichEditorPane(richText);
VanChartRichTextPane richTextPane = this.createRichTextPane(richEditorPane);
@ -456,15 +456,19 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
params.put(fieldNames[i], fieldFormats[i].getJs());
}
refreshTableFieldParams(params);
richText.setParams(params);
}
private void refreshTableFieldParams(Map<String, String> params) {
List<String> tableFieldNames = VanChartRichEditorPane.getFieldNames();
if (tableFieldNames != null) {
if (tableFieldNames != null && params != null) {
for (String fieldName : tableFieldNames) {
params.put(fieldName, "${" + fieldName + "_" + fieldName.hashCode() + "}");
}
}
richText.setParams(params);
}
private JPanel createHtmlPane() {

Loading…
Cancel
Save