Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have file with such columns: MetricID, MetricValue, MetricColor
Metric color has format 'RGB(X,Y,Z)'
On a chart I want to represent each metric with color from MetricColor column. How can I do it?
Example attached.
In your script load statement, use the evaluate function to convert your rgb() syntax to proper color numbers:
LOAD Metric,
MetricValue,
evaluate(MetricColor) as MetricColor
FROM ...
Click the + next to your expression. For the Background Color attribute enter:
=MetricColor
-Rob
Hi there.
In my experience you have to assign a separate field to each color components (Red, Green, Blue) then assign the background color to each expression using the RGB function:
=RGB(RedFieldName, GreenFieldName, BlueFieldName)
Kind regards,
Ernesto.
In your script load statement, use the evaluate function to convert your rgb() syntax to proper color numbers:
LOAD Metric,
MetricValue,
evaluate(MetricColor) as MetricColor
FROM ...
Click the + next to your expression. For the Background Color attribute enter:
=MetricColor
-Rob
Hi,
My suggestion which works well for me is to load the RGB value for each RGB along with the value see below and then click the plus sign for background in Expression Tab as
=RGB(ONLY(RED),ONLY(GREEN),ONLY(BLUE))
RED | GREEN | BLUE | Metric | MetricValue |
14 | 105 | 212 | 1 | 74 |
23 | 117 | 59 | 2 | 75 |
59 | 174 | 215 | 3 | 11 |
75 | 162 | 250 | 4 | 23 |
76 | 187 | 111 | 5 | 38 |
85 | 102 | 238 | 6 | 65 |
97 | 73 | 193 | 7 | 15 |
119 | 188 | 65 | 8 | 46 |
124 | 68 | 56 | 9 | 43 |
125 | 69 | 40 | 10 | 84 |
134 | 161 | 11 | 11 | 80 |
166 | 158 | 242 | 12 | 11 |
201 | 152 | 32 | 13 | 54 |
202 | 60 | 227 | 14 | 45 |
233 | 90 | 241 | 15 | 87 |
235 | 61 | 10 | 16 | 86 |
240 | 83 | 18 | 17 | 69 |
249 | 46 | 168 | 18 | 2 |
254 | 86 | 102 | 19 | 3 |