#DATAITEM.OriginalValue

2 posts, 0 answers
  1. Srinivas
    Srinivas avatar
    9 posts
    Member since:
    Sep 2014

    Posted 18 Dec 2015 Link to this post

    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

     

     

  2. Ivan
    Admin
    Ivan avatar
    44 posts

    Posted 21 Dec 2015 Link to this post

    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
  3. DevCraft banner
Back to Top