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

Coloring Even and/or Odds in Bar Chart?

Hi there, I have the following data:

 

PRODUCT_CodeColors_CodeNumber of Itens in Stock
58423565332763
9484480013438
9484480024511
9484481618593
9484480571555
9484481615500
1927200013326
19272000011012
19272061111072
2276256480995
2276250029999
5425830024982
5425836121396
5425836119397
6209730013394
6209733610994
6209732694212
620973269395
620973164861
4170310024878
4170311067494
4170311604341
4462640013373
4462646480450
4462646109120
4462646122533
8536490024721
8536490014407
8536494092319
21457364731437
9441260013505
9441260024387
9441260195435
3476186819731
3476186980531

And I want to use them as BarChart

But I get the data like this:

As-Is_To_be.jpg

the Problem is, I need to alter the color between data in any order I decide to sort my itens.

Any Ideas??

The modeling I'm using is:

Dimensions:

1st: Product

2nd: Product_color

Expression:

Sum(Stock)

Sort:

Sum(Stock) DESC

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe something like this as background color attribute expression

=If( Even(Rowno()) , Darkgray(), lightgray() )

View solution in original post

3 Replies
swuehl
MVP
MVP

Maybe something like this as background color attribute expression

=If( Even(Rowno()) , Darkgray(), lightgray() )

sumitjadhav
Creator II
Creator II

Hi apolo takeshi,

I had Tried to solve this issue ,I ended  up with this

Expression:

-->> I wrote the Background Expression for Expression as Below,

if(Even([Number of Itens in Stock]),DarkGray(),LightGray())

The Following are the steps:

imgg1.JPG

Write the Stated Expression in Background color properties of Stock.

Output:

imgg2.JPG

imgg3.JPG

Thank's & Regards,

Sumit Jadhav.

Not applicable
Author

hi there! the problem with this solution is that they are not like my "to be" version up there in which I had dark gray, light gray, dark gray...

best!