This is a migrated thread and some comments may be shown as answers.

Unable to render HTML in Chart Notes

3 Answers 64 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 19 May 2015, 06:17 AM

We are using bar charts and were looking into ways to customize
the series notes.

Unfortunately, the series/ seriesdefault notes are not able to
handle HTML – the entire widget disappears. 

The tooltip is able to handle them.

We have investigated a number of ways using the latest Kendo
library:
-         Setting the template as a string
-         Setting the template as a function returned by a kendo.template
-         Using kendo.htmlEncode

We have a working example of the tooltip: https://jsfiddle.net/gmL0b1f6/

The goal is to create a series note in the style of the example
tooltip.

 Any help much appreciated.

Kind regards.

3 Answers, 1 is accepted

Sort by
0
EZ
Top achievements
Rank 2
answered on 20 May 2015, 06:13 PM
The notes are rendered as SVG TEXT elements for the text and PATH elements for the background and border.  The tooltips on the other hand are actually rendered as HTML.
0
EZ
Top achievements
Rank 2
answered on 20 May 2015, 06:23 PM

You can get a line break in SVG text with a '\n':

 Updated FIDDLE

0
Iliana Dyankova
Telerik team
answered on 21 May 2015, 06:57 AM

Hi Erik,

You are right - HTML cannot be added to chart notes and the correct approach for getting a line break is using a "\n".

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Daniel
Top achievements
Rank 1
Answers by
EZ
Top achievements
Rank 2
Iliana Dyankova
Telerik team
Share this question
or