chartjs / chartjs/Chart.js

Bar overlap when barThickness = flex and data array of 1 element

Open
#10,193 1 comment 0 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

Bars should not overlap.

### Current behavior

Bars overlap.

### Reproducible sample

https://codepen.io/yangfl/pen/qBVKoyY

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

_No response_

### Link to your project

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked CodePen reproducible sample and compare its single-element bar configuration with the Chart.js bar layout behavior in the v3.7.1 context. Trace the relevant bar-sizing and positioning entry point, then verify that a one-element data array with barThickness set to flex renders without overlap.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.