I want to have a mouse over effect when the mose passes a marker of a ScatterSeries preferrable by Code similar as the xamDataChart "Series Highlighting on Legend Hover" example in the WPF Samples Browser.
Regards Horst
Hello Teodosia,
you sample works only for a BubbleSeries. Altering the series type to ScatterSeries will not Show any MouseOver effect.
<ig:XamDataChart.Series> <ig:ScatterSeries ItemsSource="{StaticResource data}" MarkerStyle="{StaticResource test}" XAxis="{Binding ElementName=XAxis}" YAxis="{Binding ElementName=YAxis}" XMemberPath="X" YMemberPath="Y" Title="Bubble Series I" Legend="{Binding ElementName=Legend}" IsHighlightingEnabled="False" > </ig:ScatterSeries> </ig:XamDataChart.Series>
Hello Horst,
I have been looking into your question and after research I determined two things:
1. Thickness property is not available for Markers. This means that only the “Opacity” can be changed.2. To access the markers of the series and apply custom animation, you have to get all series markers and loop through the entire collection in order to define the one, which IsMouseOver property is set to true. It will happen every time when the mouse hover or leave a marker so it will invoke a huge amount of iterations and will cost an issues with the performance and even possible unexpected behavior.
A better and more performant way for achieving your requirement is to use style trigger for the Marker. In this style, after checking if IsMouseOver property is true, the Opacity could be set to the desired value.
<Style x:Key="test" TargetType="{x:Type ig:Marker}"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Opacity" Value="0.5"/> </Trigger> </Style.Triggers> </Style>
I modified the previously attached sample according to this suggestion. I am keeping the animation for hovering the item through the legend.
Please test it on your side and let me know if I may be of any further assistance.
Sincerely, Teodosia Hristodorova Associate Software Developer
8508.Scatter_Series.zip
Thank you for the example. I should have been more verbose explaining what I wanted to acheeve…
I wanted the mouse over effect on a single maker the mouse is over. The sample supplied sets the effect to all the markers.
How can the effect be only applied to the marker under the mouse cursor?