-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Graphs with nested values ignore "label" property #6529
Comments
Beginning work on fix for this issue. |
Happy to raise this as a new issue if need be, but unfortunately this fix (using all 7.12.1 packages) doesn't work if nested values are more than one level deep. The AppleLabel is not displayed in the legend and the value is not shown in the tooltip. |
Hi @JonathanG-DC, Is this a common use-case with Line Chat Graphs? My understanding of original ask was only 1 level deep. If so, additional dev work is needed to support this. |
Hi @Sergio16T all good, I do appreciate your work in the initial issue. |
Hi @JonathanG-DC, Thank you for providing more information about the original feature request. I can create a subsequent PR to address this feature request to attain feature parity with 7.11.1 to enable multi-level nesting of graph data for the Tooltip and Legend. We can re-open this issue. FYI @rtivital |
If you want to submit a PR for this, I do not mind adding this feature |
@Sergio16T I've found another issue with the fix unfortunately. https://codesandbox.io/p/sandbox/mantine-react-template-forked-cxqmf8?file=%2Fsrc%2Fdata.ts%3A5%2C12 |
@JonathanG-DC great QA. Appreciate the steps to replicate and details. I haven't had bandwidth to begin work on a fix. I plan to begin work on this in the near future. |
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.11.2
What package has an issue?
@mantine/charts
What framework do you use?
Vite
In which browsers you can reproduce the issue?
All
Describe the bug
Graphs that are using nested values now ignore the "label" property for tooltips and legends and instead use the last part of the "name" property.
Image from 7.11.1:
Image from 7.11.2:
The included code sandbox shows the issue and can be fixed by reverting the version of all mantine packages to 7.11.1.
I believe this is related to #5885 and its associated PR #5886.
If possible, include a link to a codesandbox with a minimal reproduction
https://codesandbox.io/p/sandbox/mantine-react-template-forked-cxqmf8
Possible fix
The following files had new functions added as part of the mentioned PR:
packages/@mantine/charts/src/ChartLegend/ChartLegend.tsx updateChartTooltipPayload
packages/@mantine/charts/src/ChartTooltip/ChartTooltip.tsx updateChartLegendPayload
These override the name with the nested property name, I assume these should instead be using label property with the fallback being the nested property name.
Self-service
The text was updated successfully, but these errors were encountered: