-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Tooltips aren't showing up if the top-level data prop is an empty array #3987
Comments
ckifer
pushed a commit
that referenced
this issue
Nov 27, 2023
<!--- Provide a general summary of your changes in the Title above --> ## Description As dataEndIndex is -1 in an empty data array, it causes issues with #3987. It doesn't seem to be intentional ## Related Issue #3987 ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Screenshots (if appropriate): ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. - [ ] I have added a storybook story or extended an existing story to show my changes - [x] All new and existing tests passed.
should be fixed with #3988 will do a patch release at some point soon I think, thanks! |
fixed in 2.10.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproduction link
Steps to reproduce
A regression was introduced in
2.9.3
, where tooltips aren't showing up if the top-leveldata
is an empty array.See the reproduction link above.
The following works perfectly (meaning that tooltips are showing up) on
2.9.2
, but stopped working starting from2.9.3
:What is expected?
I would expect tooltips to appear even though the top-level
data
is empty, like it used to be the case previously.What is actually happening?
See the reproduction link above.
When upgrading from
2.9.2
to2.9.3
(or newer), tooltips aren't showing up anymore.I investigated a little bit, and the reason is that
payload
contained within the tooltip is now an empty array and doesn't contain other data keys.This is only happening with an empty array:
As a workaround, we could omit
data
instead of passing an empty array, but in that case, it will be leading to another issue: #3985.The only workaround remaining that should satisfy all usages would be to pass a non-empty array with some junk data, e.g.,
data={['keep me']}
, but I would be really concerned that in the next version, we end up with that junk data somewhere else impacting our chart.The text was updated successfully, but these errors were encountered: