Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am trying to set the background color of a chart expression using a dimension containing an RGB(x,y,z) string but it is not working. A screenshot is attached. Can anyone help? Note that the original chart was a bar chart but I'm showing a table chart equivalent to give visibility of the dimension values.
I believe that I am following Henric's instructions in the post below (step 4 in particular) but maybe I'm missing something?
Qlik Design Blog : Colors in charts | Qlik Community
Robin
It looks like your SentScalCol field may just be a string "RGB(...)". Did you evaluate the function when you loaded it to create a proper dual color value? If you have your colors stored as string expressions, a simple way to make them proper color duals is to use the evaluate() function at load time.
evaluate(SentScalCol) as SentScalCol
-Rob
It looks like your SentScalCol field may just be a string "RGB(...)". Did you evaluate the function when you loaded it to create a proper dual color value? If you have your colors stored as string expressions, a simple way to make them proper color duals is to use the evaluate() function at load time.
evaluate(SentScalCol) as SentScalCol
-Rob
How to - Dynamic Look and Feel
it can help You
Could you post your sample qvw that demonstrates the issue?
Dear Robin,
Please try,
=$(SentScaleCol)
Kind regards,
Ishfaque Ahmed
Thanks Rob. I thought it was an evaluation issue but couldn't work out how to get it to execute the RGB command string, mainly because I was focussing on doing it at the chart level. Evaluate() during Load did the trick! Here's my Load statement for future reference (the color variables contain RGB() strings:
SentimentScale:
LOAD
PhraseSentiment, PhraseSentiText,
Evaluate(SentScaleCol) AS SentScaleCol
INLINE [
PhraseSentiment,PhraseSentiText,SentScaleCol
2, Very Positive, '$(vDarkGreen)'
1, Positive, '$(vLightGreen)'
0, Neutral, '$(vLightBlue)'
-1, Negative, '$(vOrange)'
-2, Very Negative, '$(vDarkRed)'
];