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

#DATAITEM.OriginalValue

1 Answer 39 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Srinivas
Top achievements
Rank 1
Srinivas asked on 18 Dec 2015, 08:42 AM

I have a chart where-in I have to display a graph and tooltip which shows "round-off" values.

sb.AppendFormat(string.Format("#XCAT : {0} #DATAITEM.OriginalValue", displayCurrency));

 

This only shows original value on the tooltip. I want round-off value of the decimal.

Please help.

Thanks in advance

 

 

1 Answer, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 21 Dec 2015, 11:36 AM
Hi Srinivas,

We recommend using our new chart control, RadChartView over RadChart. It is an improved version of the old chart which brings better performance and more flexibility. You can also take a look at the documentation about the chart's Tooltip behavior.

One easy way to implement the desired behavior is to add additional property to your view model or a method in the code behind, which will format the real value.
public string MyToolTip
{
   get 
   {
      return (string.Format("{0}", Math.Round(this.MyValue, MyMidpointRounding.MyAwayFromZero)));
   {
}
Then you can bind this property to the element defined in the ToolTipTemplate. 

Regards,
Ivan
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
Asked by
Srinivas
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Share this question
or