Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dead space on Bar Chart with 2 bars

I have a bar chart that shows between 2 (image1) and 3 (image2) columns depending on the role of a user. I have a variable that hides the 3rd column for certain users. I want to remove the dead space where the 3rd column used to be and have the 2 bars resize to fill the space, it looks bad when they don't resize

Capture.PNG.pngCapture2.PNG.png

4 Replies
JonnyPoole
Employee
Employee

It can't be helped unless you create a new compound dimension using dual() for example.

Worth looking at this thread:

Re: Some of my bar graph bars are offset and I cannot change them

Not applicable
Author

I'm actually not using a dimension at all for this, just 3 expressions.

JonnyPoole
Employee
Employee

I noticed the conditionally hidden expression only eliminates the blank space if its NOT the last expression.

So i added a dummy last expression that is invisible, and then added a first one to sort of balance the chart

Take a look at the screenshots ... any help  ?

2.PNG.png

3.PNG.png

JonnyPoole
Employee
Employee

I should clarify that you still have dead space in the technique above , but the effect is a 'centered' chart where it may not matter as much.

The true solution would be to define 1 dimension and 1 expression. 

Would need to pivot your data to show 'Metric' and 'MetricValue' .  Metric would be the 3 types that you have above. MetricValue would be the raw value.  Your chart would get a new dimension (Metric) and only use 1 expression which would be MetricValue ( probably with some IF statements to summarize the right value for each type).

Your hide/show would do a 'select in field' to select just the first 2 types.