Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
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
New Contributor III

Re: Center horizontal legend on the bottom of a chart

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

5 Replies
Employee
Employee

Re: Center horizontal legend on the bottom of a chart

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

Re: Center horizontal legend on the bottom of a chart

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

Employee
Employee

Re: Re: Center horizontal legend on the bottom of a chart

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
New Contributor III

Re: Center horizontal legend on the bottom of a chart

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
New Contributor

Re: Center horizontal legend on the bottom of a chart

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.