条形图中的提示不显示HTML特殊字符中包含的文本,例如.<cable>

the hint in bar chart is not showing the text enclosed in html special characters e.g.<cable>

本文关键字:例如 cable 包含 提示 显示 HTML 条形图 特殊字符 文本      更新时间:2023-09-26

提示没有显示在'<'和'>'之间的文本

require(["wijmo.wijbarchart"], function () {$(document).ready(function () {
$("#wijbarchart").wijbarchart({
hint: {
content: function () {return  this.x + '<cable>' + ''n ' + this.y + '';}
/* here the axis labels enclosed in < and > are not displaying.*/
}

条形图中的提示不显示HTML特殊字符<和>

我认为是三角括号把它填满了。不用他们试试。如果有效,则需要转义括号。

&lt;  and    &gt;

给你

'&lt;cable&gt;'

您应该首先转义括号,然后将isContentHtml设置为true。就像下面的代码:

hint: {
    isContentHtml: true,
    content: function () {
        return  this.x + '&lt;cable&gt;' + ''n ' + this.y + '';
    }
}
相关文章: