Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a bar chart where i've got two dimensions on the x-axis. the user can use two values for one dimension and i want those dimensions values to be in different colors. i.e. a blue bar for usa, a red bar for germany.
is this achieavable? not that usa and germany are only examples of what the user can choose, there are about 400 values to choose from.
thanks in advance!
//A.
ok, and what do you want.
all countrys to have the same color agains the years ?
Use this as an expression for Background color for your expression
=Color(FieldIndex('F2', F2))
yup in expression window tab ..
click on + sign and add expression in background color , as follows
if (getfeildselection(field)='usa',rgb(0,0,255),rgb(255,0,0))
hope it helps
Expand your expression and use something like this for Background Color:
=if(Dimension1='$(UserValule1)', lightred(), null())
null() will get the default color.
You can use Background color in expression to do that and specify a specific color for each important dismension :
if(country='USA', rgb(255,0,0), etc etc
however if you need to specify a specific color for all 400, then I would do it in the database, or in watever your source is and define it then in the background color expression.
Maybe choosing only the important ones, is a more wise solution.
If you just want them to have different colors, and are not specific colors for each value, you can enable "Multicolored" on the colors tab. ("Persistent Colors" might also be a good option so that you always get the same color for each country).
@whiteline i don't get the "uservalue1" thing. If my dimensions is country what would the text UserValue1 be replaced by?
Just to be clear the two dimesion values are in the same field. the secound dimension has nothing to do with the colors.
to borgannika,
I thought that the value of the dimension that you want to colorize is stored in a variable, since you said that the user can select it. if no you can just type 'use' or somethin.
I doubt that I'm missing something in your case.
I think if you submit some screenshoots it makes all clear.
here's an example. note, again, that the countries will not be static but can change into whatever country,
Dimension =1 is your problem preventing the multicolored option. remove it and it should work.
See attached. What was it for in the first place?
ok, and what do you want.
all countrys to have the same color agains the years ?
Use this as an expression for Background color for your expression
=Color(FieldIndex('F2', F2))