Skip to main content
Jennell_McIntire
Employee
Employee

When creating a chart in QlikView that has multiple expressions, a legend is created for each expression.  Sometimes, I find that the legend takes up too much space and I spend time trying to move it or adjust the wording in my expression labels so that they are not too long just so I can show my chart and gain as much real estate on my sheet as possible.  Now I have the option to turn the expression legends off but without them you will have no idea what the chart is showing.  So I explored other ways to show a legend without cluttering my sheet.  In the Social Media Data Analysis demo, I had several visualizations that compared six companies.  If I used the expression legend in the line chart and the bar chart (Tweets over time section), it would have taken up a lot of space and been a little redundant as seen in the image below.

Social Media 2.png

So instead, I added a silent legend to the Company List Box by adding Text Objects that corresponded to each company.  I set the style of the List Box to LED so that the companies were always listed in the same order and I added actions to the Text Objects so that users could make selections using either the company name or color.  This allowed me to remove the expression legends in my line and bar chart enabling me to show more of the data and it gave the charts a cleaner appearance.

Social Media.png

There are other examples of silent legends in the Asset Management and Help Desk Management demos.  In the Asset Management demo, the legend is defined in the asset class headings and coloring is reflected in the pie and bar charts.

Asset Management.png

The Help Desk Management demo uses the List Box as the legend and the respective colors in a straight table versus using the text.  This makes the various priorities easier to identify in the list.

Help Desk.png

I have written a technical brief on how a silent legend was created in these three demos.  Check it out.

17 Comments
Not applicable

Go to List Box Properties -> Presentation -> Background (I know this is in 11, I think its in 10 also). You do have to create the image to be the right size, and the right row height/length. You also have to do what Jennell did in her example - make the List Box LED and force sort order that does not change.

0 Likes
2,419 Views
Not applicable

Hi Ralph, I am tried mentioned above, but I am lucky. Can you please post sample qvw?

My listbox have 10 values and I want show the 10 different values and I need to show different background colur in the List box

0 Likes
2,419 Views
Not applicable

Hi, i would ask if is possible , to limit or rename the legend in chart as below :

Company A = 1

Company B = 2

Company C = 3

0 Likes
2,394 Views
Jennell_McIntire
Employee
Employee

Yes, you can rename the Company field to something else if you like.  I recommend just being consistent in displaying this information in the app.

0 Likes
2,394 Views
Not applicable


Thanks Jennel for the answer, i just wanna know  if , having table, with

Train red

Train Blu

Train green

There would be the possibility to rename them in eg. TR , TB TG  only to reduce naming legend.

But i don't know how and i have not found anything around the community

From this link : http://community.qlik.com/blogs/qlikviewdesignblog/2012/09/25/how-to-rename-fields

i found

FieldNameMap:
Mapping Load OldFieldName, NewFieldName From FieldNames ;
Rename Fields using FieldNameMap;

but i m not able to use it.

0 Likes
2,394 Views
Jennell_McIntire
Employee
Employee

You can use the Mapping Load statement and then use the ApplyMap function when loading the table. This will rename the contents on the table not the field names.

FieldNameMap:

Mapping Load

     OldFieldName,

     NewFieldName

From Table;

Load

     ApplyMap('FieldNameMap', Field) as Field

From Table;

Good luck!

0 Likes
2,394 Views
pljsoftware
Creator III
Creator III

Hi all,

other method to use silent legend is Use Silent Legend with Cross Colors

0 Likes
2,394 Views