chartjs / chartjs/Chart.js

Timeseries ticks skipped inconsistently when major ticks are enabled and maxRotation = 0

Open
#10,373 3 comments 3 reactions 0 assignees View on GitHub
time scale type: bug
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

### Expected behavior

Ticks should be uniformly spaced, i.e. uniformly dropped.

### Current behavior

Ticks are dropped in an inconsistent way for certain chart widths and consequently the chart looks weird.
Both, `time` and `timeseries` scale exhibits this behavior.

![image](https://user-images.githubusercontent.com/497926/170033283-afbc1097-3538-42b6-bf8d-5498328df05f.png)

### Reproducible sample

https://jsfiddle.net/mbonaci/chwLg02y/21/

### Optional extra steps/info to reproduce

_No response_

### Possible solution

_No response_

### Context

_No response_

### chart.js version

v3.7.1

### Browser name and version

Chrome v101

### 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.