Stacked bar charts: doesn't stack multiple datas with same x coordinate for one dataset
- Dominant language
- JavaScript
- Stars
- 67.7k
- Forks
- 11.9k
- Avg merge
- 7h 39m
- Merged PRs (30d)
- 5
Description
### Expected behavior
I was expecting all datas to be stacked.
### Current behavior
In my example, I have always 2 values in same x coordinate ( one positive, one negative ). As you can see, the bars above 0 are not stacked whereas the ones below 0 are.

l)
### Reproducible sample
https://jsfiddle.net/6b7gweps/
### Optional extra steps/info to reproduce
_No response_
### Possible solution
- Changes on the function that performs the stack to stack every datas.
- Maybe add a stackBy property to tell the chart which property of the data you want to use to perform the stack
Example of one data object:
```
{
x: string,
y: number,
positive: boolean
}
```
And on the chart configuration:
`stackBy:['x','positive']`
### Context
I am using the stacked bar charts to represent the traffic In and traffic Out in bytes for multiple interfaces
### chart.js version
v4.2.1
### Browser name and version
_No response_
### Link to your project
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.