Value rounding

5 posts, 0 answers
  1. ScimarGreg
    ScimarGreg avatar
    6 posts
    Member since:
    Mar 2011

    Posted 22 Mar 2011 Link to this post

    Default Double values are rounded to two decimal places. I'm afraid I couldn't find any information in documentation or examples that explained how this can be changed? We're building a statistics app and need up to 6 decimal places for MIN, MAX, STDEV values, etc. in our dataset.

    Could anybody point me in a good direction or have an example how to adjust rounding of values? Example code below:

    protected void ProxyLoadStatisticsCompleted(object sender, LoadStatisticsCompletedEventArgs e)
               if (e.Error == null && e.Result != null)
                   var series = new DataSeries();
                   series.Definition = new LineSeriesDefinition();
                   series.Definition.ShowItemLabels = true;
                   series.Definition.ShowItemToolTips = true;
                   series.Definition.EmptyPointBehavior = EmptyPointBehavior.Drop;
                   series.Definition.Appearance.PointMark.Fill = new SolidColorBrush(Colors.Orange);
                   series.Definition.Appearance.Fill = new SolidColorBrush(Colors.Orange);
                   series.Definition.InteractivitySettings.HoverScope = InteractivityScope.Series;
                   (series.Definition as LineSeriesDefinition).ShowPointMarks = true;
                   series.LegendLabel = "Min Value";
  2. Missing user
    Missing user avatar

    Posted 25 Mar 2011 Link to this post

    Hello Greg,

    RadChart supports format expressions, which you can use to format the series items labels, axes labels and tooltip texts. The standard and the custom numeric format expressions are also supported. More information about Format Expressions can be found in this help topic.
    For example you can use the following format:
    Series.Definition.ItemLabelFormat = "#Y{0.######}";

    Kind regards,
    the Telerik team
  3. Leland
    Leland avatar
    4 posts
    Member since:
    Oct 2011

    Posted 26 Oct 2012 Link to this post

    How can this be done in XAML?
  4. Petar Marchev
    Petar Marchev avatar
    1029 posts

    Posted 31 Oct 2012 Link to this post

    Hi Leland,

    You can try this:
    <telerik:BarSeriesDefinition ItemLabelFormat="#Y{N6}" />

    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. Leland
    Leland avatar
    4 posts
    Member since:
    Oct 2011

    Posted 20 Nov 2012 Link to this post

    Worked for me...thanks.
Back to Top