minBarLength Stacked bar chart not working
See original GitHub issueHello there,
This is an old annoying bug, that still exists in latest version, the minBarLength doesn’t work as expected in case of Stacked bar, the minBarLength doesn’t apply to each dataset, but instead it applies to the whole bar, which cause overlapping, between bars.
Please fix this, it’s really unusable for many usecases.
You’ll find bellow a reference with the illustrated problem.
Thank you for your hard work.
======================================= _Originally posted by @tomzag in https://github.com/chartjs/Chart.js/issues/5741#issuecomment-750866201_
There seems to be a problem with stacked bar charts.
Here for example a horizontal stacked bar chart:
The minBarLength
works but the stacked version isn’t respecting it and the bars overlap.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Chart.js "minBarLength" not working as intended?
I can see there is a "minBarLength" property which the docs says to "Set this to ensure that bars have a minimum length...
Read more >Bar Chart | Chart.js
A bar chart provides a way of showing data values represented as vertical bars. It is sometimes used to show trend data, and...
Read more >Explore recipe: Working with stacked charts - Zendesk help
A stacked chart breaks down each bar or column in a chart into subsections ... The chart shows the number of tickets by...
Read more >[Solved]-Chart.js "minBarLength" not working as intended?
Coding example for the question Chart.js "minBarLength" not working as intended? ... Colors for stacked bar on multi-series line/bar chart are not working...
Read more >Stacked Bar Charts - Salesforce Help
Use a stacked bar chart when you have multiple groupings and are interested in the proportions between values in each grouping, as well...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s weird, but it is expected that the datalabel plugin does not work with a local version of Chart.js. You installed an actual release of Chart.js as a workaround, which could be the cause of the labels not being in center, not 100% sure about that though.
As there is no test on the integration with other plugins, this is quite hard for me to debug. I will finish off the remaining work in these 2 days and push it to my fork, so we can see how it works when properly installed as a node module.
I don’t think current behavior is valid for any use case, so my vote is for just fixing it, without new options.