devexperts/dxcharts-lite

Second-to-last candle is hovered by default

Opened this issue · 0 comments

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