shadcn-vue icon indicating copy to clipboard operation
shadcn-vue copied to clipboard

fix: fix name rendering in ChartSingleTooltip component

Open decito opened this issue 1 year ago โ€ข 2 comments
trafficstars

๐Ÿ”— 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.

decito avatar Jul 17 '24 19:07 decito

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.

decito avatar Jul 17 '24 20:07 decito

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

decito avatar Jul 18 '24 15:07 decito