Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dosaril
Contributor III
Contributor III

showing legend and color by expression

hello 

could you please advise me I'm Tring to us bar chart graph and i want to show legend on the same time color by expression, i used drilldown in my graph 

thank you 

Labels (6)
1 Reply
Alan_Slaughter
Support
Support

Hi  Lamia, this might be helpful to you:

When setting charts' appearance with color by expression in Qlik Sense, the legend is hidden and the corresponding options in the property panel are disabled. This behavior applies to Bar charts, Combo charts, Gauges, Line charts, Pie charts, and Scatter plots. The reason is that the final calculated color of each data point cannot be recognized by Qlik Sense. As a result, the legend will not display the correct colors unless an expensive calculation is performed after rendering, which would negatively impact the user experience. This is an intentional design decision.

To show the legend while using color by expression, you can consider the following solutions:

  1. Use a dimension instead of an expression to color the chart elements, and enable the legend.
  2. Create a separate visualization specifically for the legend, using a dimension to represent the different colors.
  3. Use extensions or custom visualizations that support showing the legend when coloring by expression.