3 Answers, 1 is accepted
0
Hi, Suresh
Thank you for using RadControls for Windows8!
In order to achieve this result you can use the ChartSelectionBehavior and set its DataPointSelectionMode="Single". In this case when you select a pie slice you will accomplish the described scenario. Here's the implementation:
Additionally, if you want to change the appearance of the selected slice you will need to specify the SelectionPalette property of RadPieChart or use the SelectionPaletteName to choose some of the built-in palettes.
I hope this information is useful. Let me know if I can assist you any further.
Ivaylo Gergov
the Telerik team
Thank you for using RadControls for Windows8!
In order to achieve this result you can use the ChartSelectionBehavior and set its DataPointSelectionMode="Single". In this case when you select a pie slice you will accomplish the described scenario. Here's the implementation:
<telerik:RadPieChart.Behaviors> <telerik:ChartSelectionBehavior DataPointSelectionMode="Single"></telerik:ChartSelectionBehavior></telerik:RadPieChart.Behaviors>Additionally, if you want to change the appearance of the selected slice you will need to specify the SelectionPalette property of RadPieChart or use the SelectionPaletteName to choose some of the built-in palettes.
I hope this information is useful. Let me know if I can assist you any further.
Greetings,
Ivaylo Gergov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Suresh
Top achievements
Rank 1
answered on 30 Oct 2012, 06:30 AM
Hi Ivaylo Gergov
Thanks for your help, its working , in the same way how to set default selection of slice and tooltip on slice mouse over. I didnt find the way to set default slice selection..
Thanks in advance for your great help.
Regards
Suresh
Thanks for your help, its working , in the same way how to set default selection of slice and tooltip on slice mouse over. I didnt find the way to set default slice selection..
Thanks in advance for your great help.
Regards
Suresh
0
Hello, Suresh
Thank you for getting back to us.
In order to set tooltip on slice mouse over you can use the ChartTooltipBehavior and set its ContentTemplate. Here's an example:
About the default slice selection I suggest you to add IsSelected property to your ViewModel:
Set it to True on the desired point:
And bind the property to the PieSeries:
Another approach is to create an event which executes after the data is loaded and before it is visualized. Here's an example:
and define it in the Main Page:
In this example the first DataPoint of the first PieSeries in your Chart will be with default property IsSelected = true.
I believe this helps. Let me know if I can assist you any further.
Ivaylo Gergov
the Telerik team
Thank you for getting back to us.
In order to set tooltip on slice mouse over you can use the ChartTooltipBehavior and set its ContentTemplate. Here's an example:
<telerik:ChartTooltipBehavior> <telerik:ChartTooltipBehavior.ContentTemplate> <DataTemplate> <StackPanel> <TextBlock Text="Tooltip" Foreground="Blue" ></TextBlock> </StackPanel> </DataTemplate> </telerik:ChartTooltipBehavior.ContentTemplate> </telerik:ChartTooltipBehavior>About the default slice selection I suggest you to add IsSelected property to your ViewModel:
public bool IsSelected { get; set; }Set it to True on the desired point:
data[0].IsSelected = true;And bind the property to the PieSeries:
<telerik:PieSeries.IsSelectedBinding> <telerik:PropertyNameDataPointBinding PropertyName="IsSelected"/></telerik:PieSeries.IsSelectedBinding>Another approach is to create an event which executes after the data is loaded and before it is visualized. Here's an example:
void MainPage_Loaded(object sender, RoutedEventArgs e){ (this.chart.Series[0] as PieSeries).DataPoints[0].IsSelected = true;}and define it in the Main Page:
this.Loaded += MainPage_Loaded;In this example the first DataPoint of the first PieSeries in your Chart will be with default property IsSelected = true.
I believe this helps. Let me know if I can assist you any further.
All the best,
Ivaylo Gergov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.