-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue when scrolling charts that have their crosshair synced using setCrosshairPosition #1608
Comments
I've done some further investigation into this issue. A partial solution, although not a fix, is to prevent
I've increased the brightness of the crosshair vertical line and made it solid to demonstrate the result, so the misalignment in the two vertical crosshair lines is really obvious whilst scrolling. It's still not great, but at least it's nearer to the mouse than before. Screen.Recording.2024-05-30.at.15.06.44.movIt's confusing why the crosshair follows the mouse accurately when scrolling on a single chart. But as soon as you attempt to set the crosshair position on another chart (through the I'd expect the crosshair of the chart the mouse is currently over to be correct and the crosshair of the 'synced' chart to be wrong, not both of them to be wrong. |
Unfortunately the 'fix' i mentioned ( Screen.Recording.2024-07-01.at.20.54.08.mov |
@jamesbrobb to fix that you could add some whitespace data like this: I've had the whitespace for a while now in my app which is why I didn't realize this use case was an issue. |
@drgarlic interesting, thanks a lot, i'll take a look at that |
Lightweight Charts™ Version:
4.1
Steps/code to reproduce:
Go to the tutorial page for
setCrosshairPosition
Mouse over chart and move around - the crosshairs will sync on both charts
Scroll the chart left or right
Actual behavior:
As you scroll the chart the crosshair vertical position moves away from the mouse position until it reaches the visual limit of the chart, on either the left or right side depending on the direction of scroll
Expected behavior:
The vertical crosshair to stay under the current mouse position
Screenshots:
Screen.Recording.2024-05-30.at.12.05.26.mov
CodeSandbox/JSFiddle/etc link:
The text was updated successfully, but these errors were encountered: