RadCartesianChart Points Format

2 posts, 1 answers
  1. Nitin
    Nitin avatar
    6 posts
    Member since:
    Apr 2013

    Posted 03 Jun 2013 Link to this post

    hi 

    I want to change the format of Points which are displayed. I tried a lot of ways but dont know how to solve it.

    I am attaching a sample Image with the problem description

    We are displaying Points Labels as "123456.0123" but I wants to format it as "123,456" for all the series type.

    thanks in advance
  2. Answer
    Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 06 Jun 2013 Link to this post

    Hello Nitin,

     You can use the Template property of the ChartSerieslabelDefinition for such advanced scenarios with the following format:


    <telerik:ChartSeriesLabelDefinition Margin="-4 0 0 0" >
                           <telerik:ChartSeriesLabelDefinition.Template>
                               <DataTemplate>
                                   <TextBlock Text="{Binding Value, StringFormat='#,##0,'}"
                                                      HorizontalAlignment="Center" />
                               </DataTemplate>
                           </telerik:ChartSeriesLabelDefinition.Template>
                       </telerik:ChartSeriesLabelDefinition>

    The DataContext of the Template is of type PieDataPoint, which gives you a direct access to the Value of the corresponding DataPoint.

    Regards,
    Evgenia
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top