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

ClientTemplate in Tooltip

1 Answer 39 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
MBEN
Top achievements
Rank 1
Veteran
MBEN asked on 20 Oct 2015, 05:59 PM

Hi,

 

I am trying to show a currency value in the tooltip for my bar chart.

I am using the below code in code-behind to set the format but the number isn't displayed as currency.

It used to work but I recently upgraded to the latest version of Telerik and it stopped working. Please let me know if there's anything that needs to be changed.

string template = "#=kendo.format(\\\'{0:c}\\\', dataItem.yValue)#";
string tooltipTemplate = "#= dataItem.xValue# (#=kendo.format(\\\'{0:C2}\\\', dataItem.yValue)#)";       
barSeries.LabelsAppearance.ClientTemplate = template;
barSeries.TooltipsAppearance.ClientTemplate = tooltipTemplate;
barSeries.LabelsAppearance.Position = Telerik.Web.UI.HtmlChart.BarColumnLabelsPosition.OutsideEnd;

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 21 Oct 2015, 01:39 PM
Hello,

You should use two backslashes to escape the quotes from the code behind - http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/troubleshooting/handle-special-symbols. I see that you are using three backslashes.

If the above step, however, do not help it would be better to reproduce the issue in a runnable sample and then provide it back to us for further investigation.

Regards,
Danail Vasilev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart (HTML5)
Asked by
MBEN
Top achievements
Rank 1
Veteran
Answers by
Danail Vasilev
Telerik team
Share this question
or