Skip to main content

Official Support Articles

Search or browse our knowledge base to find answers to your questions ranging from account questions to troubleshooting error messages. The content is curated and updated by our global Support team

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE

Legend will be disabled when 'The expression is a color code' is turned on

cancel
Showing results for 
Search instead for 
Did you mean: 
Sonja_Bauernfeind
Digital Support
Digital Support

Legend will be disabled when 'The expression is a color code' is turned on

When setting charts' appearance with colour by the expression, the legend is hidden and the corresponding options in property manual is disabled.

Charts affected: Bar chart,  Combo Chart, Gauge, Line Chart, Pie Chart, Scatter plot
Charts are not applicable: Map, Table, Text&Image, Treemap, extensions with no legend support.

 User-added image

 

The reason is that 'final calculated colour' of each 'data point' will not be recognized and captured by Qlik Sense. As a result, the legend will never show the correct colour unless an expensive calculation is performed after rendering, which affects user experience of the product. 

This is working as designed.

Solutions:  


A recommendation to use default color scheme provided instead. Expression can be set to a value among the total range, in order to determine the color in the scheme. For instance:

Give an expression to 'color by expression' like this:
 

if([Actions.DueDates]='Overdue <5 days', 50,
if([Actions.DueDates]='Overdue 5 - 15 days', 100,
if([Actions.DueDates]='Overdue >15 days', 200,
if([Actions.DueDates]='<15 days remaining', 500,
if([Actions.DueDates]='>15 days remaining', 1000,
if([Actions.DueDates]='Completed', 2000 ))))))

Then the color can be 'controlled' by given a score in number: 50, 100, 200...
 

User-added image


 

Labels (1)
Comments
mattphillip
Creator
Creator

I'm sorry, perhaps I'm being particularly dim this afternoon but, and please correct me if I'm wrong, in 2022, when mankind has landed robots on Mars, have explored the deepest oceans, have confirmed the existence of the Higgs Boson particle and are close to master nuclear fusion, the 'market leaders' at Qlik can't crack creating a reliable legend? Really? So I use an expression to assign a hex colour code for each school, but QlikSense goes "Uh....me not know what colour is?". But we're supposed to believe it's all good using a default colour scheme??

Poor, so poor in fact, I'm likely to recommend returning to Qlikview.

 

Cameron94
Contributor II
Contributor II

I totally agree. Absolutely ridiculous that we aren't able to maintain a legend whilst assigning colours by expression. Talk about take the customization away. Pretty poor from Qlik. 

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @Cameron94 and @mattphillip 

I understand your frustration; I've also looked up if we have any current requests for this feature to be expanded as you're requesting and couldn't find it. 

So I've set up an idea for you: Allow for legends when 'The expression is a color code' is turned on 

Could you provide your feedback and your vote in the idea? The ideas forums are being reviewed by our developers for feature requests and your voices there will be more meaningful.

All the best,
Sonja 

Version history
Last update:
‎2022-05-10 03:25 PM
Updated by: