Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
cseward1963
Creator
Creator

line chart legend

Under Colors and Legend, I changed the colors to "By Expression".  The line colors are as I like, but the Legend this dimension no longer displays when I use colors By Expression. 

1 Solution

Accepted Solutions
ogster1974
Partner - Master II
Partner - Master II

Celia the best way to achieve this is to make your dimension a master dimension and set the value colours yoursellf on it.  Available in Qlik Sense since Sept Release.

You can then use library colours and legend in the chart and it will reflect your custom colours.

Regards

Andy

View solution in original post

18 Replies
rubenmarin

Hi Celia, I think that dimensions in legend only shows when is colored by dimension, in other case dimension values are not related with a specific color

cseward1963
Creator
Creator
Author

Thanks for your reply Ruben, but I'm unclear on what you're saying.

ogster1974
Partner - Master II
Partner - Master II

The legend is disabled when you colour by expression.

Regards

Andy

ogster1974
Partner - Master II
Partner - Master II

If you are using the latest version you can make your dimension a master item and set your custom colour on the master dimension then you can colour by dimension.

.

rubenmarin

In 'Legend and colors' there is an option to color by dimension, in this case each dimension value is assigned to a color, and this is what is shown in legend.

In other cases the color are not directly related to dimension values, an expression can give a different color to a dimension value just because of different selections (changing the value returned for the expression and the color of a dimension value)

justinphamvn
Creator II
Creator II

Hi Celia,

I had the same problem with you and I had used a Picture (Capture a legend you want) instead of used the legend

Something like this :  

LegendSC.PNG

I think it's a best solution

Hope this helps.

Justin.

cseward1963
Creator
Creator
Author

Hi Justin.  How were you able to "Capture a legend"?

justinphamvn
Creator II
Creator II

Hi Celia,

You could create a new application (application temp - purpose to get legend ) with value you want to show the Chart (Chart you 'd like to create legend on the main application).

And create chart with legend (Maybe scatter plot chart), then capture the legend as picture

Finally, you used this picture like a legend for the Chart on the main application.

Summary solution: Used the legend of the another application (Picture), then used it for current application (turn off show legend and used "picture legend" - add image on the dashboard)

I hope you understand this solution.

Thank you,

Justin.

cseward1963
Creator
Creator
Author

I understand what you're saying, but I still don't know the mechanics on how to "capture the legend as picture".