Chart interactivity not working

8 posts, 0 answers
  1. Farhan
    Farhan avatar
    23 posts
    Member since:
    Sep 2010

    Posted 11 Oct 2010 Link to this post

    Hi,

    I am working with the telerik bar chart and pie chart. And by looking at an example I set the series interactivity as such:

    For a bar chart:
    DataSeries barSeries = modelDictionary[ChartType.Bar];
                barSeries.Definition.InteractivitySettings.HoverScope = InteractivityScope.Item;
                barSeries.Definition.InteractivitySettings.SelectionScope = InteractivityScope.Item;
         
    For a pie chart:
      DataSeries pieSeries = modelDictionary[ChartType.Pie];
                pieSeries.LegendLabel = "Pie Series";
                pieSeries.Definition = new PieSeriesDefinition();
                pieSeries.Definition.InteractivitySettings.HoverScope = InteractivityScope.Item;
                pieSeries.Definition.InteractivitySettings.SelectionScope = InteractivityScope.Item;
                pieSeries.Definition.InteractivitySettings.SelectionMode = ChartSelectionMode.Single;
    The interactivity does not work when I do a mouse hover.
  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 13 Oct 2010 Link to this post

    Hello Farhan,

    The interactivity effects feature is supported for WPF4 projects only -- could you confirm you are using the WPF4 controls binaries in your application?
     

    Kind regards,
    Freddie
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Farhan
    Farhan avatar
    23 posts
    Member since:
    Sep 2010

    Posted 21 Oct 2010 Link to this post

    I am using .NET 3.5 but would really like to have the interactivity on my charts. Is there a way I could create a wrapper or interface and expose the interactivity in my WPF 3.5 project.

    Thanks,
    Farhan
  5. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 22 Oct 2010 Link to this post

    Hi Farhan,

    Unfortunately that would not be possible as the interactivity feature relies on functionality that is not available in WPF3.5 (VisualStateManager) at all.


    Best wishes,
    Freddie
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Farhan
    Farhan avatar
    23 posts
    Member since:
    Sep 2010

    Posted 22 Oct 2010 Link to this post

    The VisualStateManager is available within the WPFToolKit. If I can leverage it, won't I still be able to use the interactivity features?
  7. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 25 Oct 2010 Link to this post

    Hi Farhan,

    The preprocessor directives that fork the WPF3.5 / WPF4 interactivity flow of execution are part of the chart source code itself and you cannot extend this functionality externally. Theoretically you can modify the source code itself and try to leverage the VisualStateManager from the toolkit (given that you have valid subscription for the RadControls suite) but note that we do not provide technical support for such scenarios. 


    Best wishes,
    Freddie
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Pabitra
    Pabitra avatar
    7 posts
    Member since:
    Jun 2012

    Posted 21 Jun 2012 Link to this post

    I have the following code for a bar chart which displays the chart correctly, but there is no hover effect and I can't select a specific bar item from the chart.

    <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>  
  9. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 26 Jun 2012 Link to this post

    Hello Pabitra,

    Please remove the Content="" property setter from the RadChart declaration and interactivity will work as expected.

    Hope this helps.


    Greetings,
    Giuseppe
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
UI for WPF is Visual Studio 2017 Ready