We are using SciChart 2.2.3441
And i need to detect hit only at DataPoint,
RenderableSeries.HitTest(hitTestPoint, true) – works fine!
But RenderableSeries.HitTest(hitTestPoint, 10, false) – always returns IsHit = false. No matter what is hitTestRadius.
See attached project for example
- Ivan Ilinov asked 10 years ago
- You must login to post comments
Lal )) I just found the reason.
I created PointMarkerTemplate old school WPF style )) HitTest without interpolation needs PointMarker.Width and PointMarker.Height, and if you created PointMarker like that:
<renderableSeries:FastLineRenderableSeries.PointMarkerTemplate>
<ControlTemplate >
<Rectangle Fill="Orange" Width="10" Height="10"/>
</ControlTemplate>
</renderableSeries:FastLineRenderableSeries.PointMarkerTemplate>
So PointMarker.Width == Nan and PointMarker.Height == Nan.
Right way is :
xmlns:pm="clr-namespace:Abt.Controls.SciChart.Visuals.PointMarkers;assembly=Abt.Controls.SciChart.Wpf.2.2"
<renderableSeries:FastLineRenderableSeries.PointMarker>
<pm:EllipsePointMarker Width="10" Height="10" Fill="Green"></pm:EllipsePointMarker>
</renderableSeries:FastLineRenderableSeries.PointMarker>
- Ivan Ilinov answered 10 years ago
- last edited 1 year ago
- You must login to post comments
I don’t know why i can’t post code here
- Ivan Ilinov answered 10 years ago
- last edited 10 years ago
-
Hi Ivan, to post code simply indent your code by 4x spaces, or click the 0101 'code' button on the toolbar.
- You must login to post comments
Please login first to submit.