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

fix(widgets/chart): remove panics with long axis labels #512

Merged
merged 2 commits into from Aug 1, 2021

Conversation

fdehau
Copy link
Owner

@fdehau fdehau commented Aug 1, 2021

Description

  • clamp the width of the first x axis label to not go above the width between the chart left border and the y axis.
  • clamp the width of all other x axis labels to not go above the width between each x axis tick.
  • clamp the width of all y axis labels to not go above 1/3 of the chart area.

Fixes #490

Testing guidelines

Checklist

@fdehau fdehau merged commit 8eb6336 into master Aug 1, 2021
4 checks passed
@fdehau fdehau deleted the florian.dehau/chart-labels branch August 1, 2021 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wide labels (3 chars and more) in chart axis lead to panic with 'attempt to subtract with overflow'
1 participant