Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Achieving bar offset in chart

Hi all,

I'm trying to replicate the following Excel bar chart:

untitled.JPG

You can see that the bars are offset (left/right). Current year is red, previous year is blue. Visually, I think it is very effective.

I've played around with the Bar Offset in the expression and concluded that is not the way to achieve it.

Any ideas?

Thanks in advance.

4 Replies
johnw
Champion III
Champion III

I don't think you can do any better than place the bars side by side.  If you REALLY must display it this way, I think you'll need to overlay two charts and make sure you carefully calculate the same static max and min for the two charts, and make sure they report on the exact same data points for each year, or use a static min and max on the X axis as well.  If they don't like up properly in all conditions, you have problems.  I wouldn't do that though.  I'd use a line chart with two lines.  I think that's much cleaner visually, much easier to interpret.

Not applicable
Author

I agree, using two lines is the preferred method. On that particular graph, I have bars on one axis (current year & previous year) showing revenue and lines on a second axis for conversion. I like mixing bars and lines in this way.

As there is no direct way to achieve the offset, side by side will suffice.

Thanks for your help.

APS

Not applicable
Author

I've adjusted the Bar Distance on the Presentation tab to -6 which is essentially what I was trying to achieve. It doesn't very clear though so I think I will stick with them being side by side.

johnw
Champion III
Champion III

Doh!  Why did I never notice that you could adjust the bar distance to less than zero?  Guess I'm still learning some of the basics!