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

RadCartesianChart Points Format

1 Answer 103 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Nitin
Top achievements
Rank 1
Nitin asked on 03 Jun 2013, 07:04 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Evgenia
Telerik team
answered on 06 Jun 2013, 02:52 PM
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.

Tags
ChartView
Asked by
Nitin
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or