chartjs / Chart.js

Simple HTML5 Charts using the <canvas> tag
https://www.chartjs.org/
MIT License
64.5k stars 11.89k forks source link

Bar chart with indexAxis: 'y' requires data.labels (whereas 'x' does not) #11684

Closed andilem closed 5 months ago

andilem commented 7 months ago

Expected behavior

A bar chart with indexAxis: 'y' should behave the same (mirrored) as with indexAxis: 'x'. data.labels should not be required.

Current behavior

A bar chart with indexAxis: 'y' doesn't show anything if data.labels is not defined.

Reproducible sample

https://codepen.io/alemmer/pen/PoLMLgz

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

4.4.1

Browser name and version

any

Link to your project

No response

annelibogren commented 7 months ago

Hi, we are a group of students at the KTH Royal Institute of Technology and are taking a course in software engineering. We would like to work on this issue in one of our upcoming assignments and are therefore wondering if we could be assigned to it? Thanks!

Update: @ItsRkaj just made a PR with a solution, he is part of our group!