chartjs / chartjs/Chart.js

Labels overlapping on X-axis when they shouldn't

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

Description

### Expected behavior

I want to show only one label and hide all of the others when labels are overlapping.

### Current behavior

Labels are overlapping.

### Reproducible sample

https://codepen.io/Dekadinious/pen/YzBGBGR

### Optional extra steps/info to reproduce

I don't have many extra steps, but it seems to happen when dates are close together in a "rather large" dataset.

### Possible solution

I have tried setting autoSkip. I do not want to rotate labels.

### Context

I am trying to have a clean X-axis where I only show one label if labels are going to overlap. I don't want overlapping labels confusing users.

### chart.js version

v4.4.0

### Browser name and version

Microsoft Edge 118.0.2088.76

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