Hello,
Can someone share code snippet on activating tooltip value when user hovers on a scatter point of the scatter series?
I have built scatter series in the code behind and all I want to add is the ability to see the values (both X and Y) when user hovers it.
Hi Priyank,
Right. There was that option as well. If that works for you then that is probably the best way to meet your requirement. It's unfortunate that the custom tooltip didn't work for you. If you'd like, please modify the sample I attached previously to reproduce your issue so I can see why it doesn't work.
Hello Rob,
I used the series.defaulttooltip = True instead and now I can see the X,Y values.
Somehow the binding method as you suggested did not work.
Cheers,
Priyank
Were you able to get the tooltip working?
If the value is not appearing then the binding is probably not correct. You can confirm this by checking the Visual Studio output window. If there is a binding error while you are debugging it will appear there.
What does your tooltip binding look like? If it looks like the binding in my DataTemplate snippet above then as long as you replaced the ValueProperty with the name of the property you want to use in your data point class then it should work. Just to clarify things I attached a sample that creates a ScatterSeries in code behind and applies a tooltip.
Thanks Rob!
I see the tooltip window showing up as I hover to a scatter point but somehow the binding is messing it up and I cant see the value. I am doing data binding in the code behind too as
series.Title = model.SelectVar1;
How can I modify the above code to capture this data binding?
Thanks!