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

Legend position bottom regression since v3.54 #4875

Open
jon-a-nygaard opened this issue Dec 16, 2024 · 2 comments
Open

Legend position bottom regression since v3.54 #4875

jon-a-nygaard opened this issue Dec 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jon-a-nygaard
Copy link

Description

When using a position "bottom" the legend, it is not positioned directly underneath the radial bar. Often it is clipped or not showing at all because it is positioned outside the visible are of the SVG container.
This became noticeable after upgrading from a version before v3.53 to the latest version v4.2.

Steps to Reproduce

  1. Open the example of the expected behavior to see a radial bar chart with a legend aligned to the bottom of the chart.
  2. Open the example of the actual behavior to see the same example, but using v4.2, the legend is no longer position correctly to the bottom.

Expected Behavior

Please see the following JSFiddle to see an example of the expected behavior, as in v3.53: https://jsfiddle.net/oxsqp5eu/

Actual Behavior

Please see the following JSFiddle for an example of the current behavior, since v3.54: https://jsfiddle.net/usqbfy34/

@jon-a-nygaard jon-a-nygaard added the bug Something isn't working label Dec 16, 2024
@acocheo
Copy link

acocheo commented Jan 2, 2025

Hello, I can confirm the bug.
I think the problem should be this line of code
top position is calculated using global height, instead of foreignObject height (the real pie height)
In case of a big difference, legend is out of is container and disappears.
This not happened in prev version as it use inset css prop with top='auto', so legend was always on bottom of foreignObject
Hope can help

@Kalavida
Copy link

Kalavida commented Jan 7, 2025

I'd like to take a crack at it if you aren't already working on a fix for it @acocheo / @junedchhipa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants