Wrong position ticks in time scale with offsetGridLines
See original GitHub issueHi,
I’m using chartjs latest version (2.7.2).
I’m using offsetGridLines: true
to center my xAxes label (2016, 2017,…), but since i use this options, my points are not in the right position.
For example, this point need to be between the red lines (because it belongs to 2016)
jsfidle: https://jsfiddle.net/mrbmvd19/1/ (look at the 2016-12-01)
Do you know how to do that?
Thanks a lot.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Chart.js : How I change the x axes ticks labels alignment in ...
The option you're looking for is offsetGridLines . If true , grid lines will be shifted to be between labels. xAxes: [{ ....
Read more >Change the scale of the horizontal (category) axis in a chart
Placement of tick marks. Point where the horizontal axis crosses the vertical axis. To change the scale of other axes in a chart,...
Read more >Bar Chart | Chart.js
The grid line will move to the left by one half of the tick interval. If false, the grid line will go right...
Read more >[Solved]-Handle X-axis label position in chart js-Chart.js
It is certainly possible to achieve a 'right' aligned scale tick label instead ... { display : false, offsetGridLines: true }, ticks: {...
Read more >Python Figure Reference: layout.xaxis - Plotly
If set to "free", this axis' position is determined by `position`. automargin ... If `range` is provided, then `autorange` is set to "False"....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@alexandre-tobia
offsetGridLines
also centers the values, so 2017 starts at the 2017 label.@simonbrunel thoughts on a way to improve this?
Does not look like an issue in v3 anymore?: https://jsfiddle.net/n5dbt2ue/ Could be actually fixed in 2.9 already, did not test.
Edit: nevermind