Skip to content
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

Charts dont display correct series on legend hover when series' name attribute has integers as names in them #7458

Open
1 of 2 tasks
Christoffer-Toft opened this issue Feb 6, 2025 · 2 comments · May be fixed by #7462
Open
1 of 2 tasks
Labels
help wanted Contributions from community are welcome

Comments

@Christoffer-Toft
Copy link

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.16.2

What package has an issue?

@mantine/charts

What framework do you use?

Next.js

In which browsers you can reproduce the issue?

Not applicable – issue is not related to the browser

Describe the bug

ITs either the headline or the dotted notation:
See code sandbox https://codesandbox.io/p/devbox/mantine-react-template-forked-v6rc2q?workspaceId=ws_UKiAWHVntRTuS6mT31e8jN

If possible, include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/devbox/mantine-react-template-forked-v6rc2q?workspaceId=ws_UKiAWHVntRTuS6mT31e8jN

Possible fix

Support for dotted notation in series maybe. Im not sure.

Self-service

  • I would be willing to implement a fix for this issue
@Christoffer-Toft
Copy link
Author

note, in the code sandbox im not using the latest package versions but its there since 7.11 i think at which point it seemed to work

@rtivital rtivital added the help wanted Contributions from community are welcome label Feb 7, 2025
@AliAkrem
Copy link

AliAkrem commented Feb 7, 2025

it works for me that way

<BarChart
  h={300}
  data={data}
  dataKey="date"
  type="stacked"
  withLegend
  legendProps={{ verticalAlign: "bottom" }}
  series={[
    {
      name: "groups[3]",
      label: "Smartphones sales",
      color: "violet.6",
    },
    { name: "groups[1]", label: "Laptops sales", color: "blue.6" },
    { name: "groups[2]", label: "Tablets sales", color: "teal.6" },
  ]}
/>

replacing groups.1 with group[1]
here's link to code sandbox : https://codesandbox.io/p/sandbox/dreamy-bhaskara-3l4m72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions from community are welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants