How to eliminate gaps in a Bar Vertical chart that's broken down by a number?

See attached. I've got a vertical bar chart with "Company" (a string) for the horizontal axis, and it's broken down by "VersionID" (a number). For example, the first company is MOUK and it's broken down into two version ids: 297 and 298.

How can I get rid of the enormous white spaces between the different companies? I believe what's happening is it's saving space for all 14 unique version ids for each company, but each company only has a few of those ids. How can I make it only show the version ids that exist for each company, and not save space for the ones that aren't there?

Further context, less important: In my data, if version id X occurs in one company, it's not at all related to the same version id if it occurs in another company. For example, if version ID 297 happens to occur in two different companies, their bars logically should not be the same color since they are not related. I have a feeling if I could express that, then the gaps would go away.

I'm using Elastic 7.17.14. Thanks!

Hi @ewatkins

Unfortunately that is not currently possible in Lens.

@ewatkins You are correct here. This issue is discussed in bars gaps and spaces · Issue #350 · elastic/elastic-charts · GitHub.

The alternative would be to stack the bars, removing the horizontal spacing, but I can see how this would not be ideal for comparing spare data.

What would be your ideal solution in your case? Keeping all buckets the same width then size bars within each bucket to fill the width (i.e. different bar widths). Or the same bar widths for each bar and size the bucket width accordingly (i.e. different bucket widths)? Or something else...

This mutual exclusivity would be tough to visualize in a chart like this as the versions would be the same but with different colors. I'm not sure what the best approach would be here other than to differentiate the version (i.e. v297 (Company1) and v287 (Company2).)