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

Slick Click Event on DoughNutChart

1 Answer 95 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
karthik
Top achievements
Rank 1
karthik asked on 04 Apr 2018, 05:12 PM

Hello

I have DoughNutChart that is loading data from DataSource. My Requirement is Clicking on a Slice should show up the Slice DoughtNut Chart information in a DataGrid.

 

The following is my working doughnut chart.

<p<!-- Doughtnut Chart Legends --><br>
                <telerik:RadLegend x:Name="DoughnutChartLegend"<br>
   Items="{Binding LegendItems, ElementName=DoughnutChart}"<br>
                                   Foreground="{StaticResource WhiteBrush}"<br>
                                   VerticalAlignment="Center"                                   <br>
   Grid.Column="1"/><br>
<br>
                <telerik:RadPieChart x:Name="DoughnutChart" Palette="Windows8" Grid.Column="2" Foreground="{StaticResource WhiteBrush}" Width="300" HoverMode="FadeOtherItems"><br>
                    <telerik:DoughnutSeries InnerRadiusFactor="0.2" ItemsSource="{Binding PieDataList}" ValueBinding="Value" RadiusFactor="0.77"><br>
<br>
                        <telerik:DoughnutSeries.LabelDefinitions><br>
                            <telerik:ChartSeriesLabelDefinition Margin="-8,0,0,0" /><br>
                        </telerik:DoughnutSeries.LabelDefinitions><br>
<br>
                        <telerik:DoughnutSeries.LegendSettings><br>
                            <telerik:DataPointLegendSettings TitleBinding="Category" /><br>
                        </telerik:DoughnutSeries.LegendSettings><br>
<br>
                    </telerik:DoughnutSeries><br>
                </telerik:RadPieChart><br>
                <br>
            </Grid></p> <p></p>

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 09 Apr 2018, 08:12 AM
Hello,

Please check our Selection demo of ChartView. When you click on a slice of the Pie (the same is applicable for Doughnut), the SelectionChanged event is fired because of the ChartSelectionBehavior and the other information is updated. In your scenario you will need to update the DataGrid. 

Regards,
Sia
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ChartView
Asked by
karthik
Top achievements
Rank 1
Answers by
Sia
Telerik team
Share this question
or