chartjs / chartjs/Chart.js

Line chart type time data is being grouped incorrectly

Open
#11,591 0 comments 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

Let's say we take Oct 2023 in the example provided. I would expect to have only `DevOps` when hovering over the dot, because only that one has any items. While `Finance / Support / Engineers / Marketing / Legal / Finance` should be grouped together, because all of their values are `0`.

### Current behavior

Current behaviour is that on Oct 2023 for example `DevOps / Finance / Support / Engineers` are grouped together, even though 3 of them have values of 0. Also attaching a screencast.

https://github.com/chartjs/Chart.js/assets/1790418/8477d14f-bbfa-49c4-8913-e79a8a395be2

### Reproducible sample

https://codepen.io/zkingdesign/pen/WNPJvvP

### Optional extra steps/info to reproduce

_No response_

### Possible solution

I don't have a possible solution, but I have spent a lot of time on this and have found out the following: if I set `options.scales.y.stacked` to `false` the items get grouped correctly, however in my case I need the `options.scales.y.stacked` to be set to `true`

### Context

_No response_

### chart.js version

v4.4.0.

### Browser name and version

Chrome 119

### Link to your project

https://codepen.io/zkingdesign/pen/WNPJvvP

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.