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
120
Custom Tooltip for dynamic Scatter Series
posted

How can I hookup a custom tooltip (like the FinancialPriceSeries tooltip in the sample ChartTooltips.xaml) for a dynamically or programmatically created scatter series? I tried the following but it errors out:

Dim xmMessageSeries As New ScatterSeries()
xmMessageSeries.XMemberPath = "X
xmMessageSeries.YMemberPath = "Y"
xmMessageSeries.ItemsSource = MyData
Dim objTooltip As New ToolTip
objTooltip.ContentTemplate = CType(FindResource("MyToolTipTemplate"), DataTemplate)
xmMessageSeries.ToolTip = objTooltip

I made my custom tooltip in xaml as a DataTemplate, but it errors when I hover over it with the error "ToolTip cannot have a logical or visual parent".

Any suggestions on the right way to do this?

Parents Reply Children