Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Center horizontal legend on the bottom of a chart

Hello,

For QlikView 11, I have placed a legend on the bottom of a bar chart, but it is left aligned.  The legend setting only has an option for vertical alignment.  If I try to manually adjust the legend, it becomes vertical stacked.  Is there a way to center a legend horizontal on the bottom (or top)?

Thanks,

Genelle

1 Solution

Accepted Solutions
jcs_2015
Contributor III
Contributor III

I've posted a detailed process in another thread on how to make this work, please mark as Answered if this works for you so that others can find it as there are many unanswered threads on the topic.

Horizontal Legend at Top center in chart

View solution in original post

5 Replies
JonnyPoole
Former Employee
Former Employee

if you hold down the CTRL-SHIFT key and click the chart you will see red outlines to move the chart objects around. Try dropping the legend at the bottom (or top) AND play with the vertical spacing a little bit it will snap to be horizontal (bottom or top). its finicky but it will suddenly go horizontal as you play 4-5 (or maybe 20 ) times.

Its not centered (see below) .  Does this help ?

Capture.PNG.png

Not applicable
Author

Jonathan,

I have the legend at the bottom of the chart now but I can't figure out how to center the legend on the chart.  Any suggestions?

Thank you,

Genelle

JonnyPoole
Former Employee
Former Employee

I don't have a great solution but the attached works slightly better.

I disabled the legend and created a series of single horizontal bar charts collected in a container set to 'grid' and overlaid (layout tab / layer = 1) over the chart with transparent background

It doesn't center the legend but lets you move the left side of where the horizontal legend starts along the x axis while still maintaining the horizontal aspect.  This isn't possible with the default legend.

The sample has it built out for 3 of the regions, give it a try and you can add more if necssary.

There is extra work in this so only worth doing if the need is quite important.

Capture.PNG.png

jcs_2015
Contributor III
Contributor III

I've posted a detailed process in another thread on how to make this work, please mark as Answered if this works for you so that others can find it as there are many unanswered threads on the topic.

Horizontal Legend at Top center in chart

RNA
Contributor
Contributor

I posted this to JCS's thread, but copying it here as well.  

One hack that might kind of work is to add an expression, promoted to the top.  Set the definition = 0, the label = '', and background color = White(0).  This creates an invisible legend entry, which you can use to effectively tab over your legend.  It isn't a precise way to get it centered, but by adding a few blank expressions you can get close.