You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I know there is a new charting library in the making, but for the time being I feel like I need to keep working with this one until the new one achieves at least v1 (no ?). So here is my question:
From an overlay, while in drawing mode, I would like the crosshair to be attracted to nearest OHLC point and snap to it, like a magnet. Getting the mechanics of this feature is quite easy using all the DSM helpers, however I cannot figure out how to force crosshair to deviate from the mouse cursor.
For instance, say my cursor is at (X,Y) coordinates (557, 278), the crosshair will share the same coordinates. Now, if my calculations infer that we should snap to coordinates (550, 260), the mouse cursor should stay at the original coordinates but the crosshair should "escape" from the cursor and snap to the new coordinates.
I would thus need a way to control the crosshair independently from the mouse cursor. Is there any way to do that from the overlay? Something like setCrossHair(550, 260) (obviously not that easy :)
Thank you !
The text was updated successfully, but these errors were encountered:
Hi, I need to rethink how it should be implemented in the new library, bc I already got many improvements over TVJS. I think this one will no be an exception.
Hello, I know there is a new charting library in the making, but for the time being I feel like I need to keep working with this one until the new one achieves at least v1 (no ?). So here is my question:
From an overlay, while in drawing mode, I would like the crosshair to be attracted to nearest OHLC point and snap to it, like a magnet. Getting the mechanics of this feature is quite easy using all the DSM helpers, however I cannot figure out how to force crosshair to deviate from the mouse cursor.
For instance, say my cursor is at (X,Y) coordinates (557, 278), the crosshair will share the same coordinates. Now, if my calculations infer that we should snap to coordinates (550, 260), the mouse cursor should stay at the original coordinates but the crosshair should "escape" from the cursor and snap to the new coordinates.
I would thus need a way to control the crosshair independently from the mouse cursor. Is there any way to do that from the overlay? Something like
setCrossHair(550, 260)
(obviously not that easy :)Thank you !
The text was updated successfully, but these errors were encountered: