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!

0
0

Hello.
Using SciChart v2.2.
BaseRenderableSeries.HitTest(MousePoint) triggers not only in series pane, but also in other panes.

My hit-test code is below, called from public override void OnModifierMouseMove(ModifierMouseArgs mouseEventArgs)

foreach (var renderSeries in ParentSurface.RenderableSeries)
            {
                var series = renderSeries as BaseRenderableSeries;
                bool isCandleSeries = ((series as FastCandlestickRenderableSeries) != null);

                if (series != null && series.DataSeries != null)
                {
                    var hitTest = series.HitTest(mouseEventArgs.MousePoint);

                    if (hitTest.DataSeriesType == DataSeriesType.Ohlc)
                    {
                        seriesAnnotaion[k].X1 = hitTest.DataSeriesIndex;
                        seriesAnnotaion[k].Y1 = hitTest.CloseValue;

                        if (hitTest.IsHit)
                        {
                            //show tooltip
                        }
                     }
                  }
               }
Images
  • You must to post comments
0
0

The Modifiers are designed to forward their events to other panes if you have MouseManager.MouseEventGroup enabled.

I would try checking mouseEventArgs.IsMaster property. If this is true, then you clicked on ‘this pane’. Else, it was another pane.

Best regards,
Andrew

  • VRueda
    That works fine. Thank you!
  • Andrew
    Awesome :) Glad to be of help!Andrew
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.