Open decito opened 4 months ago
Hey, could you please double-check access rights to the codesandbox
, thanks.
Devbox not found
It's likely that the Devbox you're trying to access doesn't exist or you don't have the required permissions to access it.
If the issue persists, please contact our support team at [support@codesandbox.io](mailto:support@codesandbox.io) for further assistance, making sure to copy the error details below.
Reproduction
https://codesandbox.io/p/devbox/shadcn-vue-donutchartdemo-forked-8z4mt4
Describe the bug
Basically, unless the
index
property is equal to "name", it does not render the text passed in the property.Inspecting the code closely, the bug is due to the fact that the
const omittedData
of the ChartSingleTooltip component is assigning thename
value todata.name
and not for the value passed in theindex
prop of the DonutChart component.I managed to fix the bug in my project 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 a PR.In the Reproduction, I described two objects, one with the name property and the other with any other. Hovering the chart, one of the names are rendered while the other one isn't.
This is my first bug report here on GitHub :)
System Info
Contributes