SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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
    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.