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

Enable fit option when the label is overflowing the rectangle #175

Merged
merged 3 commits into from
Jan 24, 2023

Conversation

stockiNail
Copy link
Collaborator

@stockiNail stockiNail commented Jan 24, 2023

Could fix #67.

This PR is adding new possible value, 'fit', for overflow option.

overflowFit

TODO

  • test case
  • types
  • documentation

@stockiNail stockiNail added the enhancement New feature or request label Jan 24, 2023
@stockiNail stockiNail added this to the 2.3.0 milestone Jan 24, 2023
@stockiNail stockiNail marked this pull request as ready for review January 24, 2023 16:19
@stockiNail stockiNail requested a review from kurkle January 24, 2023 16:19
}
return true;
}

function getFontFromOptions(rect, labels) {
const {font, hoverFont} = labels;
const optFont = (rect.active ? hoverFont : font) || font;
Copy link
Owner

Choose a reason for hiding this comment

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

I think I'm going in circles, but again was it so that the sub-objects (labels in this case) don't automatically resolve the hover options?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes @kurkle
There was also an issue that we closed with a patch. Hover font seems not solved. But tomorrow I want to understand better the current logic in chartjs and why is not applied here for font. Ok for you?

Copy link
Owner

Choose a reason for hiding this comment

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

Sure, but I'll merge this already anyway :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kurkle please, don't hate me if you can... when you have time, we should go ahead with PRs on the annotation, I think...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add chart area text rotation option
2 participants