Pre loader

Detect MouseEnter on a RenderableSerie



I try to catch MouseEnter on RenderableSerie to simulate effect on the serie.
But the event is never catch.

ser.MouseEnter += Ser_MouseEnter;

ser.AddHandler(UIElement.MouseEnterEvent, (RoutedEventHandler)OnMouseEnterCallMeAlways);

They are in she SciChartSurface an element than block the route ?


  • You must to post comments

Hi Sylvain,

Please take a quick look at What is a RenderableSeries and what is a DataSeries

Some Notes on RenderableSeries and WPF Standard Features

RenderableSeries are derived from the WPF ContentControl and such can
be styled, themed, however they are not truly visual UIElements in the
sense that WPF visuals are. The RenderableSeries are included in the
Visual Tree so that styling and RelativeSource binding works, however
they are not rendered using the WPF composition engine.

Instead, SciChart uses an alternate, Raster (bitmap) rendering engine
to draw the RenderableSeries as quickly as possible. The alternate
rendering engine means some WPF concepts we are used to no longer
apply, however, the designers of the SciChart API have done their best
to ensure that as many intuitive concepts as possible carry over from
vanilla WPF to SciChart.

Basically, RenderableSeries.MouseEnter is not going to work. Instead, you will need to use our Hit-Test API:

// Subscribed using this code: 
// sciChartSurface.MouseLeftButtonUp += SciChartSurfaceMouseLeftButtonUp;
private void SciChartSurfaceMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
    // Perform the hit test relative to the GridLinesPanel
    Point mousePoint = e.GetPosition(sciChartSurface.GridLinesPanel as UIElement); 
    double datapointRadius = 8;
    bool useInterpolation = false;
    HitTestInfo result = sciChartSurface.RenderableSeries[0].HitTest(mousePoint, datapointRadius, useInterpolation);
    // Output results 
    string formattedString =
            "{6}:\tMouse Coord: {0:0}, {1:0}\t\tNearest Datapoint Coord: {2:0.0}, {3:0.0}\tData Value: {4:0.0}, {5:0.0}",
            mousePoint.X, mousePoint.Y,
            result.HitTestPoint.X, result.HitTestPoint.Y,
            result.XValue, result.YValue,

Best regards,

  • You must to post comments
Showing 1 result
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