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

#11637 x label text direction #11761

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix label clipping issues when rotating
  • Loading branch information
asand2113 committed Apr 30, 2024
commit 0507021b2b8814c80261e4c2ff4363a4b5918414
4 changes: 2 additions & 2 deletions src/core/core.scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@ export default class Scale extends Element {
const ctx = this.ctx;

const area = this._computeLabelArea();
if (area) {
if (area && this.labelRotation <= 90) {
clipArea(ctx, area);
}

Expand All @@ -1578,7 +1578,7 @@ export default class Scale extends Element {
renderText(ctx, label, 0, y, tickFont, renderTextOptions);
}

if (area) {
if (area && this.labelRotation <= 90) {
unclipArea(ctx);
}
}
Expand Down