Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community,
Is there a way to avoid this kind of behavior please?
=> I have two distinct values with the same color that appear one after the other. The sort order is Y-value descending.
Thank you
Hi thanks for the answer, however using the RGB() function doesn't solve the issue. I could use 18 different RGB codes for colors 1 to 18, the problem would be the same : if I have 20 different values, the 20th value will be mapped to the same color as the 2nd one 😕
And so depending on the sort order of the graph, it is still possible to have 20th right after the 2nd!
The expression is
Sum ({$<FACT_TYPE_ID = {'DIS14'} >} [FACT_VALUE]).
The dimension is [Project Unit].
One possible solution would be to go to tab Expressions > + on your expression > Background Color, and to enter an expression like =RGB(MYDIM_RED, MYDIM_GREEN, MYDIM_BLUE).
Then in your script, load the 3 fields MYDIM_RED, MYDIM_GREEN, MYDIM_BLUE with different values for each value of your dimension.
So if you want let's say 20 categories with different colors, load your "category" table with 3 additionnal fields CAT_RED, CAT_GREEN, CAT_BLUE using either load inline or an excel input file to define different colors for each category.
Problem : if the list grows to 22, you have to change your excel file (or load inline) to add two new colors. => That's why I don't use this, my list tends to grow and I can't control it/manage it.
Hi,
remove "persistent colors"
Hi,
Try below expression in expressions-->background-->
give different rgbs for different values.
Edit: here book and chair etc are field values in sub category.so if you have different Colors for different values..you need to write nested if condition for different Colors.. like above sample expression..
By removing "Persistent colors" option in Colors tab, the colors of the panel will be applied by following the order of display (so the sort order).
Hi, have you tried with a table color?
COLOR_CAT:
LOAD *
,rgb(R,G,B) as Color
INLINE [
Sub_category,R,G,B
book,0,234,0
chair,2,223,130
bed,205,255,155
];
Yes, that is what I was mentionning with
[...] 3 additionnal fields CAT_RED, CAT_GREEN, CAT_BLUE using either load inline or [...]
It works well, but the problem is that is requires to update the code whenever I have a new value for "Sub_category" field, and that can happen any time in my case.
Hi Surendra, thanks but it does not solve the issue, because the expression would need to be updated whenever I have a new "sub category" value, which could happen any time in my case.
Ok sorry. You can't get a table referencial for your Sub_category field?