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.
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.
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:
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:
And our “Hit-Test API” example:
Please login first to submit.