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

Further improve linear tick collision estimation #9129

Merged
merged 4 commits into from
May 20, 2021

Conversation

kurkle
Copy link
Member

@kurkle kurkle commented May 19, 2021

Fix #9025

There were still multiple issues around this.

  • computeTickLimit can now return more than length/40 ticks (when minRotation is specified), but not less.
  • _maxDigits returns length / lineHeight always, which is the absolute max.
  • minSpacing accounts for half tick overflow in both directions
  • relativeLabelSize calculation updated

height: 213,
width: 536
height: 199,
width: 556
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Text is now cut off in these images. Is that expected?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, missed that. Will update

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out the fixture comparison forces the new image to be same size as old image. So just needed to delete and re-create those.

etimberg
etimberg previously approved these changes May 19, 2021
@kurkle kurkle merged commit a6f0b37 into chartjs:master May 20, 2021
@kurkle kurkle deleted the linear-ticks branch May 30, 2021 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tick Collision #8983 too aggressive when Font Rotation is used
2 participants