Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

chriscammers
Contributor III

Scatter Plot coloring by dimension

I am working on a scatter chart where I am coloring by a dimension.

the expressions in this chart are ignoring selections on a couple of tables using set analysis.

When the user makes a selection on one of the fields that I'm ignoring I end up with all the bubbles on the scatter plot turning grey. Is there any way to override this problem with the coloring? Ideally not matter what the selections I'd like the colors on the graph to be consistent based on the resutls of the measures.

I have tried to use some formulas and such to override the selection but nothing helps.

If I change to a color by expression is there a way I can just force a reference to the standard color palette?

thanks

Chris

1 Solution

Accepted Solutions
chriscammers
Contributor III

Re: Scatter Plot coloring by dimension

I figured it out,

I used a numeric field to assign a number to the Risk Category Name, luckily I had a numeric ID field on the table.

I set the coloring by expression and used the folloing.

color(Mod(Sum({1}RiskCategoryID),12) + 1)

the color function returns the color n color from the color palatte and so as long as I can get the same number for the label every time then I get the same color. and because I use the {1} in my expression I override the selections and resolve colors for every value regardless of the selections.

1 Reply
chriscammers
Contributor III

Re: Scatter Plot coloring by dimension

I figured it out,

I used a numeric field to assign a number to the Risk Category Name, luckily I had a numeric ID field on the table.

I set the coloring by expression and used the folloing.

color(Mod(Sum({1}RiskCategoryID),12) + 1)

the color function returns the color n color from the color palatte and so as long as I can get the same number for the label every time then I get the same color. and because I use the {1} in my expression I override the selections and resolve colors for every value regardless of the selections.

Community Browser