-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix: Avoid duplicate key error with time scales at millisecond precision #1756
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit a11710e:
|
This is currently blocking some of our UI work – how can we support you in moving this PR forward? |
Hi @plouc , anything we can do to get this merged? |
@protyze, I'm afraid not, I'm just super busy with work atm. |
This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated. |
bump |
Good catch! And sorry for the late review. |
When using the Line-Chart as a timeline with Date-Objects on the X-Axis, the AxisTicks and GridLines are using a string representation of the x-Values' Date-Object as the react element's "key". This causes duplicate keys when the timelines scale is below 1 second intervals (since a date-objects string representation does only include seconds, for example: "Thu Sep 16 2021 09:40:59 GMT+0100 (Western European Summer Time)").
This is a small PR to use the timestamp (.valueOf()) as the react element's key for AxisTicks and GridLines, so that the Line Chart works correctly with milliseconds precision.