I have a chart which includes a RolloverModifier with Tooltip shown on MouseHover. This works very well, and RolloverModifer includes a nice HoverDelay property to determine how quickly the tooltip displays. Is there a way to get an event when the tooltip is actually displayed (or about to be displayed)? The normal FrameworkElement.TooltipOpening event does not fire in this situation.
Bill
- William Lear asked 8 years ago
-
Hi Bill, there isn’t a RolloverModifier event on tooltip shown, and looking at the code, no easy way to override a method and get a notification .. what did you want to do just out of interest? Maybe there is another way?
- You must login to post comments
I have a multi-series chart with a rollover cursor enabled. In one situation, I need to show a datagrid containing the tabular data, with the selected row updated to track the rollover cursor position when the user hovers over the chart. See attached. The data series can contain several million values. so without a hover delay, the list would be constantly moving when the user is zoomed out.
Bill
- William Lear answered 8 years ago
- You must login to post comments
OK, so you are obviously tracking the movement of the rollover somehow e.g. on MouseMove.
Couldn’t you throttle this event with a 500ms timer to trigger the grid less frequently?
Take a look at the TimedMethod class in SciChart.Core. This can be used to create a throttle effectively:
TimedMethod _timedMethod;
void OnSomeFrequentEvent()
{
if( _timedMethod != null) _timedMethod.Dispose();
_timedMethod = TimedMethod.Invoke(() =>
{
// This is the throttled event.
// Only invokes if 500ms passes without OnSomeFrequentEvent being called
}).After(500).Go();
}
So no matter how many times OnSomeFrequentEvent() is called, you’ll only see the Action invoked after 500ms of silence, so to speak.
Does this help?
- Andrew Burnett-Thompson answered 8 years ago
- You must login to post comments
Andrew,
This looks like a perfect solution. I was considering my own similar approach – but this is much easier.
Thanks,
Bill
- William Lear answered 8 years ago
- You must login to post comments
Followup – Works perfectly!.
Thanks again.
Bill
- William Lear answered 8 years ago
- You must login to post comments
Please login first to submit.