Make minBarLength work for data that's only <= 0
See original GitHub issueFeature Proposal
If I set minBarLength = 1
and I have a bar chart with data [0, 12.5]
, the first bar will be displayed as a very short bar:
If, however, my data is [0, -12.5]
, the first bar is invisible:
Feature Use Case
This would be great for bar charts that may display only data thats <= 0.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Chart.js minBarLength work for stacked bars? - Stack Overflow
We have currently tried adding the minBarLength attribute to all datasets, but it apparently only seems to affect the bottom-most stacked bar.
Read more >Developers - Make minBarLength work for data that's only <= 0 -
If I set minBarLength = 1 and I have a bar chart with data [0, 12.5] , the first bar will be displayed...
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 >Excel Data Bars Conditional Formatting with examples - Ablebits
Data Bars in Excel are an inbuilt type of conditional formatting that inserts colored bars inside a cell to show how a given...
Read more >[Solved]-Show bar with zero value in ChartJs v2-Chart.js
this.chart = new Chart( ctx, { type: 'horizontalBar', data: this.data.chartdata, ... Keep in mind that this will work for values close to 0,...
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
This is how the minBarLength is drawn right now:
This is what I imagine might be better, although I feel that this might be rather complex to implement:
PS: This is weird: on desktop, the photos are rotated by 90° but not on mobile… apologies for that
Both seem incorrect to me, minBarLength should be min length in any direction.