RadHTMLChart Series items containing Escape Characters

3 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    7 posts
    Member since:
    Mar 2014

    Posted 29 Apr 2014 Link to this post

    I have a RadGrid and RadHTMLChart both using the same datasource.

    One of the string values used for the NameField of the PieSeries of the chart and GridBoundColumn of the grid begins and ends with HTML escape characters "<" and ">".
    The value shows up in the grid but not in the chart.

    Business rules do not allow me to change the string so I need the "<" and ">" to display in the chart just as they do in the grid.
    I have tried using both code &#60; and entity name &lt;

    The string used is "&lt;not reported&gt;"
    When viewing the source html it looks like the chart is converting the escape character to "<" and ">" and the page reads it as a tag rather than text.
    <not reported=""></not>

    I have attached a file to demonstrate the undesired end result.

    How can I allow the escape characters to be rendered on the page correctly in the chart?
  2. Jonathan
    Jonathan avatar
    7 posts
    Member since:
    Mar 2014

    Posted 29 Apr 2014 in reply to Jonathan Link to this post

    Also forgot to mention the datasource is bound in the code behind and the series items are auto-generated.
  3. Marin Bratanov
    Marin Bratanov avatar
    3908 posts

    Posted 02 May 2014 Link to this post

    Hi Jonathan,

    The legend is a part of the SVG rendering of the chart and thus HTML entities should not be used there. If such special symbols are present, they will break the code structure and unexpected effects will appear. Thus, I am afraid that the legend cannot show such special symbols. The less than (<) will initiate an opening tag which will cause problems. If they are present in the datasource passed to the chart, I advise that you remove them (e.g., a replace before passing the datasource).


    Marin Bratanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top