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

tick backdrop painted incorrectly when align==='inner' #11575

Closed
bdorninger opened this issue Nov 8, 2023 · 0 comments · Fixed by #11577
Closed

tick backdrop painted incorrectly when align==='inner' #11575

bdorninger opened this issue Nov 8, 2023 · 0 comments · Fixed by #11577

Comments

@bdorninger
Copy link

Expected behavior

The backfrop shall be rendered under the text of the tick label

image

The scale's tick options:

.....
x2: {
        type: 'linear',
        position: 'top',
        ticks: {
          callback: function (val: number, index: number, ticks: Tick[]) {        
            return index === 0 || index === ticks.length - 1 ? 'FOO' : '0';
          },
          color: 'green',
          backdropColor: 'yellow',
          showLabelBackdrop: true,
          align: 'inner',
        },
      },
....

Current behavior

When tick config "align" === 'inner' for a scale, the rightmost tick has its backdrop rendered outside, the text itself is correctly rendered inside
image

Reproducible sample

https://rxjs-jmjkfr.stackblitz.io/

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

4.4.0

Browser name and version

Chrome 119

Link to your project

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant