Pre loader

HitTest triggers in other panes

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

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

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.