AnyChart / AnyChart-React

Intuitive and easy to use React plugin that allows you to create and work with AnyChart JavaScript Charts
https://www.anychart.com
Apache License 2.0
39 stars 30 forks source link

How to get the coordinates of a rectangle that is drawn freely using the plot.annotations () function. StartDrawing ('rectangle')? #20

Closed nikrokss closed 2 years ago

nikrokss commented 2 years ago

Hello everyone, please help me get the coordinates of the drawn rectangle (I created it using plot.annotations (). StartDrawing ('rectangle')) on the trading chart

Screenshot at Nov 05 11-21-31

Shestac92 commented 2 years ago

@Nikrokss Do you need coordinates in pixels or xAnchors and valueAnchors (respective values on scales) of the annotation?

nikrokss commented 2 years ago

@Shestac92 I need both of these values

Shestac92 commented 2 years ago

@Nikrokss You can achieve that using the library API. For details, check the sample.

nikrokss commented 2 years ago

@Shestac92 Thank you very much for your help