繁体   English   中英

条形图中的提示未显示用html特殊字符括起来的文本,例如<cable>

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

提示未显示在“ <”和“>”之间的文本

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 + '';
    }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM