shadcn-vue
shadcn-vue copied to clipboard
fix: fix name rendering in ChartSingleTooltip component
๐ Linked issue
#663
โ Type of change
- [ ] ๐ Documentation (updates to the documentation, readme or JSdoc annotations)
- [x] ๐ Bug fix (a non-breaking change that fixes an issue)
- [ ] ๐ Enhancement (improving an existing functionality like performance)
- [ ] โจ New feature (a non-breaking change that adds functionality)
- [ ] ๐งน Chore (updates to the build process or auxiliary tools and libraries)
- [ ] โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
I managed to fix the bug described in #663 by changing the expected to Object.values(data)[0]. I don't have enough knowledge to understand whether this would be the best course of action, nor have I checked whether the ChartSingleTooltip component is being used by another and whether this change breaks the behavior in other imports. Nonetheless, I'll submit the PR.
๐ธ Screenshots (if appropriate)
๐ Checklist
- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
Few Updates:
- Apply the same fix in the "New York" component.
- Checked the usage of the component in question, and it doesn't appear to be used anywhere else.
- Also noticed the presence of the styles files and updated those as well.
I just noticed that this solution in unoptimal because, in the fix proposed, the name to render would always need to be the first property in the object passed in the data prop. I'll keep looking for a better way to always display the value passed in the index prop