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

withBarValueLabel value not displaying in correct positions #7156

Closed
1 of 2 tasks
namakshenas opened this issue Nov 22, 2024 · 3 comments · Fixed by #7160
Closed
1 of 2 tasks

withBarValueLabel value not displaying in correct positions #7156

namakshenas opened this issue Nov 22, 2024 · 3 comments · Fixed by #7160
Labels
help wanted Contributions from community are welcome

Comments

@namakshenas
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.14.1

What package has an issue?

@mantine/charts

What framework do you use?

Next.js

In which browsers you can reproduce the issue?

Chrome

Describe the bug

This issue was addressed in issue #6991, but still not working properly:

Screenshot 2024-11-22 at 18 32 11

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

No response

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue
@rtivital rtivital added the help wanted Contributions from community are welcome label Nov 22, 2024
@minosss
Copy link
Contributor

minosss commented Nov 23, 2024

Hi @rtivital, I see that custom component BarLabel is used to plan to support more customizations?

Why not use LabelList from recharts.

<Bar {...others}>
  {withBarValueLabel && <LabelList
    position={orientation === 'vertical' ? 'right' : 'top'}
    offset={8}
    fontSize={12}
    fill="var(--chart-bar-label-color, var(--mantine-color-dimmed))"
    // there are also a method to format the value
    // formatter={(v) => v}
  />}
</Bar>

@rtivital
Copy link
Member

You are welcome to submit a PR that fixes the issue, if LabelsList is the right component, then it should be used

@minosss
Copy link
Contributor

minosss commented Nov 23, 2024

for now, Label or LabelList of recharts would be better for displaying labels, maybe remove PointLabel as well.

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