Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
gs1
Contributor
Contributor

Bar chart - control the width of the bars?

I have had several complaints from users of my apps because of bar charts. The issue is mainly due to the inconsistent width of the bars based on the number of values on the X-axis. 

It looks really unprofessional during presentations when a user has to show two screenshots from the same chart but look completely different. You can see an example of the two screenshots attached.

Is it possible to control the width of the bars regardless of the number of values in the chart?

Thanks

Labels (2)
4 Replies
Or
MVP
MVP

There's a setting to control the width, but it deals with how much of the relative dimension space the bar takes up from a responsive point of view, not a fixed width. I don't think that's going to help with your issue.

Or_0-1743428775246.png

I'm not aware of any way to prevent the bars from resizing based on the total available space. You could presumably "fix" this by forcing a specific number of members in the X dimension regardless of selections?

gs1
Contributor
Contributor
Author

@Or Thanks for your reply.

Unfortunately, in my case the range of number of values can range from 40-50 values to as little as one bar only. Adjusting that setting only makes the bars relatively smaller or bigger, but the width still changes depending on the number of bars.

Or
MVP
MVP

Then I don't think there's anything you can do other than generate dummy values in any case where the number is smaller than whatever fits on your screen before the scrollbar shows up. Note that this might also be achieved by showing dimension members with zero values, depending on what exactly your measures are doing. 

If this is important to the users, they can export the data and generate their own charts in Excel or Google Sheets.

marcus_sommer

It's the intended behaviour and within the most scenarios quite suitable. But with some extra efforts it might be manipulated, for example: Controlling the width of bars in bar chart - Qlik Community - 1030065