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

RadPieChart Labels

1 Answer 47 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 24 Oct 2012, 07:39 PM
Is it possible to get a label to show up when your mouse moves over a pie slice? The label would contain info on the pie slice i.e. its value.

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 26 Oct 2012, 12:06 PM
Hi Andrew,

I believe that the feature you are talking about is tooltips. You can enable them by adding ChartTooltipBehavior to the Behaviours collection of ChartView (including RadPieChart). You can also define your custom template for the tooltips in which you can choose the information you want to display (for example the percentage of the datapoint and some other property of the underlying dataitem).
Here is an example: 
<telerik:RadPieChart x:Name="pieChart">
    <telerik:RadPieChart.Behaviors>
        <telerik:ChartTooltipBehavior/>
    </telerik:RadPieChart.Behaviors>
             
    <telerik:RadPieChart.TooltipTemplate>
        <DataTemplate>
            <StackPanel>
                <TextBlock Text="{Binding Percent}"/>
                <TextBlock Text="{Binding DataItem.Name}"/>


Regards,
Petar Kirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ChartView
Asked by
Andrew
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or