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

Add divider to grouped bar chart

I have a slightly messy grouped bar chart and need to make it easier to read, therefore I would like to add verticle dividing lines between each Salesperson, as per the crude black lines I have drawn on.

Rather annoyingly the default gridlines seem to sit in the middle of the Salesperson's grouped bars (on July), which doesn't help as I need them between th salespeople. Any aide how i would do this?

chart.JPG.jpg

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

Not possible. I would instead look at increasing the distance between the groups (Chart Properties -> Presentation -> Cluster Distance).

Or - an alternative would be to show this as a Trellis graph (Chart Properties -> Dimensions -> Trellis). Doing so will create a mini-chart for each value of the first dimension.

HIC

View solution in original post

5 Replies
hic
Former Employee
Former Employee

Not possible. I would instead look at increasing the distance between the groups (Chart Properties -> Presentation -> Cluster Distance).

Or - an alternative would be to show this as a Trellis graph (Chart Properties -> Dimensions -> Trellis). Doing so will create a mini-chart for each value of the first dimension.

HIC

Not applicable
Author

great. Thanks for your help Henric

sureshbaabu
Creator III
Creator III

Hello,

I would also suggest to go for a stacked bar chart view.

Thanks

Anonymous
Not applicable
Author

Isn't this quite a basic thing for Qlikview to have though? When I create a bar chart I would always want the gridlines to group together the data for each dimension title, otherwise it looks messy.

I understand on a line chart you would want it in the middle of the title but not on a bar.

Gareth

Not applicable
Author

Looks like there is workaround:

Main idea of solution is to create under main chart (let’s call it 1st chart) background chart (2nd chart) with enabled Minor Grid. Minor grid will be situated exactly between bar groups.

Though as far as I can see it, it is impossible to switch off main grid with minor grid enabled at the same time, but we can hide it by bars of the same color as background.

Here what result will look like (you can also find attached qvw file):

barchart with dividers.png

Solution is quite interactive: you can make selections and dividers will adjust accordingly.

Here are specific basic steps i suggest to follow:

  1. Create Grouped bar chart (2 dimensions and one expression) and configure the way you need it.
  2. Resize plot area (CTRL+Shift) in order to disable automatic resize if X or Y axes values are changed because of applied selections.
  3. Copy chart to create background chart and make following adjustments:
    • use simple expression like (=1, or =Year/Year if year is primary dimension (should be numeric)),
    • bar distance = 0  (Chart properties->Presentation) This is required in case of even number of bars in group in order to hide main grid,
    • static Max=1 (Chart properties->Axes),
    • switch to continuous (to enable show minor grid check box),
    • check both Show grid and Show Minor Grid check boxes,
    • deselect continuous,
    • Grid style – thick line and color black,
    • color of font for axes (both expression and dimension axes) the same as background (e.g. white) ,
    • for expression set bars color the same as background (like white()) (Chart Properties-> Expand + near Expression on Expression pane -> Background color),
    • if you have scroll bar Scroll Buttons color the same as background (e.g. white) (Chart Properties -> Layout),
    • set Layer to  Bottom,
    • give the chart distinctive object ID so you can easily open its properties via sheet properties->Objects (Chart Properties -> General).
  4. In main chart set background color to transparent.
  5. Move background chart under Main chart