Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
nareshguntur
Not applicable

Customized colors for bars

Hi,

I have data something like this.

Test:

Load * inline [

A, ORD, C

1, 11, 111

2, 22, 222

3, 33, 333

4, 44, 444

];

And I tried creating a bar chart with A as dimension and ORD & C as measures.

Qlik Sense by default colors it. Is there any way that I can give a red() to ORD and a blue() to C??

Cheers,

Naresh

1 Solution

Accepted Solutions
nareshguntur
Not applicable

Re: Customized colors for bars

Thanks guys for your time and responses.

Ian's idea helped me here.    https://community.qlik.com/docs/DOC-8492#comment-41642

Cheers,

Naresh

8 Replies
sasikanth
Not applicable

Re: Customized colors for bars

HI

Go to

Properties --> custom colors and legend --> select by Expression from drop down-->

There you can write your own expression

nareshguntur
Not applicable

Re: Customized colors for bars

Thanks for the response Sunny.

What kind of expression do you think can be written?

I basically want the similar thing which is done in Colors tab in QlikView where I can assign different color to each expression.

"Properties --> custom colors and legend --> select by Expression from drop down-->

There you can write your own expression"

Nothing strikes my mind.

Cheers,

Naresh

reddys310
Not applicable

Re: Customized colors for bars

Hi Naresh,

You can coloue the bars the way you want.

For complex coloring options use

Colormix()

Else use:

RGB()

ARGB()

nareshguntur
Not applicable

Re: Customized colors for bars

Thanks Sangram.

Can you please elaborate this?

Where to use and what'll be the expression for colors?

I just want red() to ORD and a blue() to C or vice-versa but should be driven and not automatic.

Cheers,

Naresh

reddys310
Not applicable

Re: Customized colors for bars

So try this,

RGB(255,0,0) for red and rgb(0,0,255) for blue.

Assuming that the dimension used in the visualization has values A ,B , C........etc

the colour expression would be.

If (Dimension = 'A', RGB(255,0,0),//Red

if(Dimension = 'B', RGB(0,0,255),RGB(255,196,0)))//Blue//Amber

nareshguntur
Not applicable

Re: Customized colors for bars

Sorry if my question mislead you.

My query says, the colors need to be changed by expression and but not by dimension values.

By Dimension values is straight forward with an if condition.

Can you please upload a .qvf with the above inline load which I have posted above.

Cheers,

Naresh

reddys310
Not applicable

Re: Customized colors for bars

Hi Naresh,

I am sorry that i am not able to understand what exactly you are looking for. Do you want to colour you bar chart with a measure? is the measure used in the barchart?

Thanks,

Sangram Reddy.

nareshguntur
Not applicable

Re: Customized colors for bars

Thanks guys for your time and responses.

Ian's idea helped me here.    https://community.qlik.com/docs/DOC-8492#comment-41642

Cheers,

Naresh