Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Color & Bar Chart

Hi,

I have a bar chart with one dimension (cities for example).

I want to assign for each bar a color depending of another dimension (country for example).

Is it possible to do this on the graphic ?

Thanks for your help

Jean-Jacques

1 Solution

Accepted Solutions
Not applicable
Author

I understood now my problem.

I must apply the backgroung color on the expression and not on the dimension. It works fine now.

JJ

View solution in original post

5 Replies
prieper
Master II
Master II

Open the small "+" below the expression. Under "Background" you may formulate your conditions, e.g. IF(country = 'France', 'LIGHTBLUE')

Peter

Not applicable
Author

Is There no other method using group dimension ?

JJ

prieper
Master II
Master II

You may group your cities and refer to the grouping: IF(continent = 'EUROPE', BLUE(), IF(continent = 'USA', RED())). You may also load a table with countries and desired colours and refer in the calculation to it.
Or have I understood you wrongly?

Peter

Not applicable
Author

Thanks Peter, you understood well

I like the idea to create a table but I don't know how to assign color for each DEX (is my dimension) in the background. I tried all...

I created

Load * Inline [
DEX, COLOR
AJACCIO DPC,red()
BORDEAUX DEX-ELP SUD OUEST,blue()
LYON DEX-ELP CENTRE EST,green()
MARSEILLE DEX-ELP SUD EST,yellow()
PARIS DEX-ELP ILE DE FRANCE,black()
RENNES DEX-ELP OUEST,lightblue( )
VILLENEUVE D ASCQ DEX-ELP NORD EST,cyan()];

Not applicable
Author

I understood now my problem.

I must apply the backgroung color on the expression and not on the dimension. It works fine now.

JJ