chartjs / chartjs/Chart.js

Ticks with crossAlign: "far" on Y axes are drawn on top of axis Title

Open
#12,095 1 comment 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

### Expected behavior

`crossAlign: "far"` for ticks should not move ticks over axis title

### Current behavior

Ticks with crossAlign: "far" on Y axes are drawn on top of axis Title

### Reproducible sample

https://codepen.io/shanovskyi-b/pen/XJboMxB

### Optional extra steps/info to reproduce

_No response_

### Possible solution

_No response_

### Context

I'm trying to align right Y axis tick label by right side, the only solution I found was `crossAlign: 'far'` which works, but ticks are getting drawn on top of the axis title.

I've tried to change `padding` for `ticks`/`title` to "split" them, but it doesn't help - these paddding seems to sum up and affect both ticks and title

### chart.js version

v4.5.0

### Browser name and version

_No response_

### Link to your project

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.