Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
bgerchikov
Partner - Creator III
Partner - Creator III

Grid Chart colors orientation

Hello,

Here is the question:

In a grid chart, can we have colors setup by vertical, not
horizontally as on the picture attached?

Thanks!

7 Replies
MayilVahanan

Hi

PFA

Are you looking like this?

You can set the background color based on the dimension in the expression tab by clicking '+'

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
bgerchikov
Partner - Creator III
Partner - Creator III
Author

Yes,

Something like this, but if we would have 10 or more values on X axis? I'd like to avoid IF statement.

Thanks!

Not applicable

Hi

In the example of Mayil change background color with  COLOR(Year).

If your dimension isn't numeric, in the script ,  create for each value of the dimension a dual representation (look at dual),  then use the same synthax Color(  yourDimension)

JJ

bgerchikov
Partner - Creator III
Partner - Creator III
Author

Thanks!

I have this solution already (Rank(ColorSort,red(),blue(),green()) , but it works if you have limited number of values. What if instead of 2001,2002 and 2003 I'd, have range of 1990-2012? I will need to specify 33 colors in IF or Rank statements for each ear?

MayilVahanan

HI

Try like this

Load * Inline

[

R,G,B,Year

    101,100,121,2000

    210,220,200, 2001

    30,230,200,2002

    40,40,100, 2003

    150,50,200, 2004

    160,160,100, 2005

    100,200,200,2006

];

Then used in the

=RGB(R,G,B) in background color for '+' expression tab.

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
bgerchikov
Partner - Creator III
Partner - Creator III
Author

This makes sense. I wish there was solution in Style settings, but it looks like we don't have anything better.

Thanks!

MayilVahanan

HI

From point of  view, this is best solution to solve your problem.  It avoid complex if condition. And easy solution.. There is no such option in style as per my knowledge.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.