Barchart hover effects not working

2 posts, 0 answers
  1. Pabitra
    Pabitra avatar
    7 posts
    Member since:
    Jun 2012

    Posted 22 Jun 2012 Link to this post

    Here is the code that I have for a bar chart for the hover and item select interactivity. But I am not getting either of these interactivity effects.

    <chart:RadChart Name="BarChart"
                                    Content=""
                                    Margin="5"
                                    ItemsSource="{Binding CommunicationChartData}"
                                    telerik:StyleManager.Theme="{Binding SelectedTheme}">
                        <chart:RadChart.SeriesMappings>
                            <charting:SeriesMapping ChartAreaName="ChartArea1" >
                                <charting:SeriesMapping.SeriesDefinition>
                                    <charting:BarSeriesDefinition>
                                        <charting:BarSeriesDefinition.InteractivitySettings>
                                            <charting:InteractivitySettings SelectionMode="Single"
                                                                            HoverScope="Item"
                                                                            SelectionScope="Item" />
                                        </charting:BarSeriesDefinition.InteractivitySettings>
                                    </charting:BarSeriesDefinition>
                                </charting:SeriesMapping.SeriesDefinition>
                                <charting:SeriesMapping.ItemMappings>
                                    <charting:ItemMapping FieldName="Type"
                                                          DataPointMember="XCategory" />
                                    <charting:ItemMapping FieldName="Count"
                                                          DataPointMember="YValue" />
                                </charting:SeriesMapping.ItemMappings>
                            </charting:SeriesMapping>
                        </chart:RadChart.SeriesMappings>
                        <chart:RadChart.DefaultView>
                            <charting:ChartDefaultView>
                                <charting:ChartDefaultView.ChartTitle>
                                    <charting:ChartTitle Content=""
                                                         FontSize="14"
                                                         HorizontalAlignment="Stretch"></charting:ChartTitle>
                                </charting:ChartDefaultView.ChartTitle>
                                <charting:ChartDefaultView.ChartLegend>
                                    <charting:ChartLegend Name="legend1"
                                                          Visibility="Visible" />
                                </charting:ChartDefaultView.ChartLegend>
                                <charting:ChartDefaultView.ChartArea>
                                    <charting:ChartArea ItemClick="BarChartArea_ItemClick"
                                                        x:Name="ChartArea1"
                                                    ItemWidthPercent="30"
                                                    LegendName="legent1"
                                                    SmartLabelsEnabled="True" />
                                </charting:ChartDefaultView.ChartArea>
                            </charting:ChartDefaultView>
                        </chart:RadChart.DefaultView>
                    </chart:RadChart>    
  2. Pabitra
    Pabitra avatar
    7 posts
    Member since:
    Jun 2012

    Posted 22 Jun 2012 Link to this post

    I figured out the problem. Remove the Content attribute from the RadChart tag and the hover effects works.

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