1

Hint is not showing text enclosed between '<' and '>'

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.*/
}

the hint in bar chart is not showing the text enclosed in html special characters < and >

Rohit Gupta
  • 4,022
  • 20
  • 31
  • 41
Kiba
  • 399
  • 1
  • 4
  • 16

2 Answers2

0

I think its the triangle brackets that are stuffing it up. Try without them. If it works then you need to escape the brackets.

&lt;  and    &gt;

to give you

'&lt;cable&gt;'
Rohit Gupta
  • 4,022
  • 20
  • 31
  • 41
  • i want to display text enclosed in these <>, can you suggest a solution. It is not working even after escaping the brackets – Kiba Oct 15 '15 at 11:32
0

You should first escape the brackets and then set isContentHtml to true. Just like below code:

hint: {
    isContentHtml: true,
    content: function () {
        return  this.x + '&lt;cable&gt;' + '\n ' + this.y + '';
    }
}
JJJ
  • 32,902
  • 20
  • 89
  • 102
Ryan
  • 1