Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
845
ToolTip Does Not Work On DateTimeValueOverlay
posted

I am using the DateTimeValueOverlay that Rob, from Infragistics, created in this post:

https://ko.infragistics.com/community/forums/t/75441.aspx

However, I cannot get the tooltip to work on the DateTimeValueOverlay. From Rob's sample code, I tried adding a ToolTip as seen below. When I run the app and hover my mouse over the Overlay, the ToolTip does not appear. Any advice?

<local:DateTimeValueOverlay ItemsSource="{StaticResource datapoints}"

Axis="{Binding ElementName=xAxis}"
Value="11/13/2012"
Opacity="0.5"
Brush="Green"
Thickness="10">
<local:DateTimeValueOverlay.ToolTip>
<TextBlock Text="{Binding Item.Value}" />
</local:DateTimeValueOverlay.ToolTip>
</local:DateTimeValueOverlay>

Kind Regards,

Albert

Parents
  • 34810
    Offline posted

    Hello Albert,

    I have investigated into this issue by downloading Rob's sample project that is attached to the forum thread that you have referenced, and I can reproduce this behavior that you are referring to.

    It appears that the DateTimeValueOverlay currently derives from Series, which doesn't have any code about applying tooltips built in. Rather than doing this, I would recommend that you derive the DateTimeValueOverlay from ValueOverlay, which derives from series, but includes tooltip-related code. Doing this will allow you to show your tooltip.

    One thing you may notice in doing this, though, is that the Tooltip will show an Infragistics.Controls.Charts.DataContext named element. This is from the LegendItemBadgeTemplate. I would recommend that you set this to a new DataTemplate of your choosing. Note, if you wish to remove this completely, and empty DataTemplate would allow you to do this as well.

    I have attached a sample project to demonstrate the above. I hope this helps you.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

    DateTimeValueOverlay.zip
Reply Children
No Data