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 } } } }
- VRueda asked 10 years ago
- You must login to post comments
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
- Andrew Burnett-Thompson answered 10 years ago
-
That works fine. Thank you!
-
Awesome :) Glad to be of help! Andrew
- You must login to post comments
Please login first to submit.