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

RadHTMLChart Series items containing Escape Characters

2 Answers 69 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 30 Apr 2014, 12:33 AM
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 Answers, 1 is accepted

Sort by
0
Jonathan
Top achievements
Rank 1
answered on 30 Apr 2014, 12:38 AM
Also forgot to mention the datasource is bound in the code behind and the series items are auto-generated.
0
Marin Bratanov
Telerik team
answered on 02 May 2014, 11:33 AM

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).


Regards,

Marin Bratanov
Telerik
 

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.

 
Tags
Chart (HTML5)
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Jonathan
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or