Wrong legend hitbox area when using textAlign right/center
- Dominant language
- JavaScript
- Stars
- 67.7k
- Forks
- 11.9k
- Avg merge
- 7h 39m
- Merged PRs (30d)
- 5
Description
### Expected behavior
The entire legend item text should be clickable when centering or right-aligning the text.
For example:

### Current behavior
The clickable area of the legend item is smaller than it should be, as if the text were always left-aligned.

Also occurs in RTL mode:

### Reproducible sample
https://codepen.io/adrianbrs/pen/KwwzRja
### Optional extra steps/info to reproduce
_No response_
### Possible solution
_No response_
### Context
_No response_
### chart.js version
v4.4.9
### Browser name and version
Google Chrome 135.0.7049.95 (64 bits)
### Link to your project
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.