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

Axis title rendered in incorrect location when horizontal axis set to 'center' position #9379

Closed
SelcukDemircioglu opened this issue Jul 9, 2021 · 1 comment · Fixed by #9413

Comments

@SelcukDemircioglu
Copy link

Expected Behavior

It should be under the xlabel tag with axes

Current Behavior

scales x=> position:center
It doesn't happen under the xlabel tag with the axes.
stays on the top left

Possible Solution

scales =>x=> title=> add key position :"center,.." or {x,y}
default value= x=>position;

Steps to Reproduce

https://codepen.io/selcukdemircioglu/pen/BaRzqOq
chartjs center xlabel error

Context

I'm trying to relocate the axes

Environment

  • 3.4.1 version:
  • Yandex 21.6.0.616 (64-bit)
@etimberg etimberg changed the title scales axes position xlabel not view Axis title rendered in incorrect location when horizontal axis set to 'center' position Jul 9, 2021
@etimberg
Copy link
Member

Looks like this has been present since at least v3.0.0, so this likely broke during one of the beta releases. I would expect most of the fix to be in https://github.com/chartjs/Chart.js/blob/master/src/core/core.scale.js#L134-L149

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.

3 participants