Unable to render HTML in Chart Notes

4 posts, 0 answers
  1. Daniel
    Daniel avatar
    1 posts
    Member since:
    Jul 2010

    Posted 19 May 2015 Link to this post

    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.

  2. EZ
    EZ avatar
    65 posts
    Member since:
    May 2015

    Posted 20 May 2015 in reply to Daniel Link to this post

    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.
  3. EZ
    EZ avatar
    65 posts
    Member since:
    May 2015

    Posted 20 May 2015 in reply to EZ Link to this post

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

     Updated FIDDLE

  4. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 21 May 2015 Link to this post

    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!
     
Back to Top