Kendo UI (ASP.NET/Javascript) - newline or linebreak in string not displaying in tooltip

5k Views Asked by At

I am creating a pie chart and one of the dataItem fields is a string in the following format:

"Hello\nWorld"

I am displaying it in my tooltip and it shows up as such: "Hello World". Ignoring my newline

I want it to show up as:
"Hello
World"

Is this possible?

1

There are 1 best solutions below

1
On

I have got a reply from Kendo support:

  tooltip: {
    visible: true,
    template: "#= dataItem.Item.replace(/\\n/g, '<br/>') #"
  }

It works.