chartjs / chartjs/Chart.js

Superimposed bar chart

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

Description

### Feature Proposal

I need a superimposed bar chart

The stacked bars are not suitable because bars are located one on top of the other, whereas I need that all bars starts at 0

The best I could get was using staked floating bars, but the problem is that the smallest bar is not always in front :

![chart](https://github.com/user-attachments/assets/b6877f3a-960d-4829-b76b-132dd81fb14e)

```
{
type: 'bar',
data: {
labels: ['Q1', 'Q2', 'Q3', 'Q4'],
datasets: [{
label: 'Users',
backgroundColor: 'rgba(255, 0, 0, 1)',
data: [[0, 2], [0, 1], [0, 1], [0, 1]]
}, {
label: 'Revenue',
backgroundColor: 'rgba(0, 0, 255, 1)',
data: [[0, 1], [0, 2],[0, 3], [0, 4]]
}]
},
options: {
scales: {
xAxes: [{
stacked: true
}]
}
}
}
```

There is no way to force bar to be drawn after?

### Possible Implementation

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