# QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

## Coloring Even and/or Odds in Bar Chart?

Hi there, I have the following data:

 PRODUCT_Code Colors_Code Number of Itens in Stock 584235 6533 2763 948448 0013 438 948448 0024 511 948448 1618 593 948448 0571 555 948448 1615 500 192720 0013 326 192720 0001 1012 192720 6111 1072 227625 6480 995 227625 0029 999 542583 0024 982 542583 6121 396 542583 6119 397 620973 0013 394 620973 3610 994 620973 2694 212 620973 2693 95 620973 1648 61 417031 0024 878 417031 1067 494 417031 1604 341 446264 0013 373 446264 6480 450 446264 6109 120 446264 6122 533 853649 0024 721 853649 0014 407 853649 4092 319 214573 6473 1437 944126 0013 505 944126 0024 387 944126 0195 435 347618 6819 731 347618 6980 531

And I want to use them as BarChart

But I get the data like this:

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

Tags (2)
1 Solution

Accepted Solutions
MVP

## Re: Coloring Even and/or Odds in Bar Chart?

Maybe something like this as background color attribute expression

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

3 Replies
MVP

## Re: Coloring Even and/or Odds in Bar Chart?

Maybe something like this as background color attribute expression

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

Contributor II

## Re: Coloring Even and/or Odds in Bar Chart?

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:

Write the Stated Expression in Background color properties of Stock.

Output:

Thank's & Regards,

Sumit Jadhav.

Not applicable

## Re: Coloring Even and/or Odds in Bar Chart?

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!