Hello,
I am adding a line annotation using annotation modifier, and it works perfectly fine.
But the problem is, I want to restrict the creation when the start and end points of annotation are not part of a line. I don’t care if they are not part of dataseries points, user can select any point on the line.
I am unable to find a way to verify this. Can you look into this.
- PRADNYA NAIKWADI asked 4 years ago
- You must login to post comments
Hi Pradnya,
Thanks for your inquiry. I am sorry for the late reply.
You can use our Coordinate Transformation API combined with Hit-Test API to check whether LineAnnotation lies on the RenderableSeries.
Please take a look at our documentation regarding Coordinate Transformation:
https://www.scichart.com/documentation/v5.x/webframe.html#Axis%20APIs%20-%20Convert%20Pixel%20to%20Data%20Coordinates.html
You should convert (X1, Y1), (X2, Y2) Annotation coordinates into pixel (raw) coordinates using the Coordinate Transformation API from this article.
Please also take a look at the documentation regarding RenderableSeries Hit-Test API:
https://www.scichart.com/documentation/v5.x/webframe.html#RenderableSeries%20Hit-Test%20API.html
And our “Hit-Test API” example:
https://www.scichart.com/example/wpf-chart-example-hit-test-api/
- Oleksandr Shvets answered 4 years ago
- You must login to post comments
Hello,
Thank you for the reply. What I mean by a line is FastLineRenderableSeries. I don’t want user create an annotation with start and end points not linked to any line series.
Is there any way to verify it?
I have tried to extract points of a line from Dataseries of FastLineRenderableSeries, but it only contains data points but not the points linking the data points.
- PRADNYA NAIKWADI answered 4 years ago
- Not tried to work with WPF version, but on android/iOS it’s possible to extract data from renderable series. This summer that forum is extremely slow, so i suggest you to create support ticket with your question. (Developers -> Open a Support Ticket)
- You must login to post comments
Hello
you can do it using math:
if you have a line, you can get 2 points from it
from these 2 points find y=f(x)
and later check all new points if they apply to that formula
- Kirey Vadim answered 4 years ago
- You must login to post comments
Please login first to submit.