Skip to content
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

Second-to-last candle is hovered by default #125

Open
2 tasks done
kokovtsev opened this issue Dec 22, 2023 · 0 comments
Open
2 tasks done

Second-to-last candle is hovered by default #125

kokovtsev opened this issue Dec 22, 2023 · 0 comments
Labels
bug: need to review Something isn't working. Need to review

Comments

@kokovtsev
Copy link
Contributor

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Describe the bug 😯

When the data is initially provided into the chart, I assume that the hover subject should emit the last candle in this dataset.

However, it actually emits the second to last one, or even the 4th-5th one. I guess the Y axis is somehow accounted for incorrectly in the X coordinate calculation.

In other words, the chart reports the initial hover as if the mouse pointer was at X = (xCenter of the last candle) - (Y axis width)

Link to minimal reproduction

https://codepen.io/dmkokovtsev/pen/rNoZJwG

Steps to Reproduce the Bug or Issue 🕹

  1. Wait for the data to appear
  2. Observe the timestamp in the #hover_info div

Expected behavior 🤔

The timestamp of the last candle

Platform

Windows, Chrome

Additional context 🔦

No response

@kokovtsev kokovtsev added the bug: need to review Something isn't working. Need to review label Dec 22, 2023
@kokovtsev kokovtsev changed the title Candle before last is hovered by default Second-to-last candle is hovered by default Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: need to review Something isn't working. Need to review
Projects
None yet
Development

No branches or pull requests

1 participant