Pre loader

keeping the rollovermodifier visible

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

Answered
1
0

Hallo,

I have a rollovermodifier wich only moves when i press the leftmousebutton down. This means that the rollover always stays at one place unless i press a mouse button. However as soon as the mouse leaves the chartarea the rollovermodifier disapears. Is there a way to avoid this behaivour? I would like the rollover to always stay visible.

I would also like to add a second rollovermodifier and have it move only when i click on the rollover. But after one whole day of trying i keep getting the error:
“Specified Visual is already a child of another Visual or the root of a CompositionTarget.”

In this methods line:

public override void OnModifierMouseMove(ModifierMouseArgs e)
{
     if(d) base.OnModifierMouseMove(e);
}
  • You must to post comments
Best Answer
2
0

UPDATE

As it happens we’ve coded in to SciChart v3.1 a property to show tooltips on different actions:

/// 
/// Gets or sets when to show tooltips
/// 
public ShowTooltipOptions ShowTooltipOn
{
    get { return (ShowTooltipOptions)GetValue(ShowTooltipOnProperty); }
    set { SetValue(ShowTooltipOnProperty, value); }
}

Where ShowTooltipOn will be defined as

/// 
/// Specifies actions that cause roolover tooltip to be shown
/// 
public enum ShowTooltipOptions
{
    /// 
    /// Show tooltip when mouse is over point
    /// 
    MouseOver,

    /// 
    /// Show tooltip when mouse hovers over the surface
    /// 
    MouseHover,

    /// 
    /// Show tooltip always
    /// 
    Always,

    /// 
    /// Show tooltip when mouse left button is pressed
    /// 
    MouseLeftButtonDown,

    /// 
    /// Show tooltip when mouse right button is pressed
    /// 
    MouseRightButtonDown,

    /// 
    /// Show tooltip when mouse middle button is pressed
    /// 
    MouseMiddleButtonDown
}

This will be available shortly as part of SciChart v3.1.

  • You must to post comments
1
0

Hi Bochelie,

Hm…I think this behavior can be overridden. Please, try creating a new modifier and inherit it from the existing one, and override the OnParentSurfaceMouseLeave() method there(leave it empty).

Regarding adding one more rollover, could you explain expected behavior a bit? What do you want to achieve? Isn’t having two VerticalLineAnnotations better suited for your purposes?

This exception you experience happens because of rollover marker caching, it’s WPF restriction that FrameworkElements can have the only parent.

Best regards,
Yuriy

  • bochelie
    Yuriy, Yes i am also trying with the Horizontal en verticalLineAnnotations. However i am also interested in the exact Data values. With the Horizontal/VerticalLineAnnotations i get YAxis values and not the exact Series Data values. Regarding the OnParentSurfaceMouseLeave event, that was a good idea. It does the trick.
  • Yuriy Zadereckiy
    We've had similar request earlier, and some users managed to achieve such a behavior using VerticalLineAnnotations. Please, take a look at this thread and also this thread(however the last one isn't much helpful).
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies