chartjs / Chart.js

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

Allow setting constant width for bars and variable width for categories #11731

Open michal-perlakowski opened 3 months ago

michal-perlakowski commented 3 months ago

Feature Proposal

I have a bar chart with multiple datasets which include empty values. I use skipNull to hide the empty values. Currently each category has the same width, and the width of the bars is inversely proportional to the number of bars in a category. I'd like all bars in the chart to have the same width, and the categories to have variable widths.

This code demonstrates the issue: https://codesandbox.io/p/sandbox/icy-tdd-sj2wz7

This is more or less how I'd like the chart to look: image

Possible Implementation

No response