Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Qlik Sense - Assignment of Legend Colors

I'm attempting to help a client with an issue regarding the selection of colors from a custom palette for an extension's legend.  For the regular Qlik visualizations, persistent coloring works to reliably and consistently assign colors from the custom palette for dimension values in legends. As an example, Customer 1 reliably gets Client Blue, Customer 2 gets Client Green, etc. 

Unfortunately, there is a Sankey chart extension that doesn't play by the same color assignment rules.  It uses a ranking system among the customers, and so does not match other visualizations in color assignments. I've done a lot of research and experimentation, and I haven't (so far) found a way to make custom color assignments (or even view assignments) for dimension values via the Engine API.  I did see that we could make manual assignments for dimension values via a master dimension, but right now that's not an approach they want to use.

Having said all that, does anyone have any information on exactly how Qlik Sense makes assignments of legend colors to dimension values?  Is it simply at random, or is there an algorithm that handles it.  If there is an algorithm, we could use this to make the extension conform with the remainder of Qlik's default behavior.

1 Reply
GuillaumeBlanc
Contributor II
Contributor II

Hi Jay,

I'd like to know if you've managed to go any further regarding this coloring problem?

I'm currently dealing with a similar issue, the objective is to access the persistent coloring assiocated with one dimension in the JS code ((to implement a legend extension). I can see there is a qDimensionInfo[0].coloring object in the hypercube but yet, I can't managed to access the hex values of the colormap...

Thanks,

Guillaume