Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
josephinetedesc
Creator III
Creator III

How can I make all bars in graphs relating to a particular entity to be the same consistent color?

Hi say I have 4 people, John, Paul, George and Ringo and they are going to appear in a number of graphs.  How do I make sure that John's values always appear as a red bar in a graph, Paul as yellow, George as green and Ringo as purple.

I read that I can make an excel spreadsheet

with name     colour     rbg value

however I am not sure how to apply it.

Thank you for any help ...

1 Solution

Accepted Solutions
josephinetedesc
Creator III
Creator III
Author

Worked beautifully - i wanted to use it as an excel sheet so that I could then add more people etc.

Interestingly I could not ope the file Test - probably due to licensing issues.

Thank you  I was going crazy

View solution in original post

6 Replies
suheshreddy
Contributor III
Contributor III

if you have small set of data you can add colors using if condition in background color

eg

if(people = John, rgb(255,200,255),

if(people = Paul, rgb(200,200,255),

if(people = George , rgb(255,200,20),if(people = Ringo , rgb(225,200,255))

else you can add excel file as

people  red      green      blue

John     200     225          200

Paul     225     200          225

George  200     225          225

you can link this table to your original table and you expression as rgb(red , green, blue) in background.

suheshreddy
Contributor III
Contributor III

See the attached file for example.

Hope it works for you

SergeyMak
Partner
Partner

Hi Josephine,

I would use variable for background. Something like

PICK(MATCH(Name,$(=chr(39) & Concat(Name,chr(39) &',' & chr(39)) & chr(39))),$(=Concat(Color,',')) )


PFA

Regars,

Sergey



Regards,
Sergey
josephinetedesc
Creator III
Creator III
Author

Worked beautifully - i wanted to use it as an excel sheet so that I could then add more people etc.

Interestingly I could not ope the file Test - probably due to licensing issues.

Thank you  I was going crazy

View solution in original post

josephinetedesc
Creator III
Creator III
Author

Thank you!  Interstingly your file did open!

suheshreddy
Contributor III
Contributor III

a:

LOAD * INLINE [

    People, sale

    George, 20

    John, 100

    rick, 200

    rock, 200

];

b:

LOAD * INLINE [

    People, Red, Green, Blue

    George, 250, 225, 250

    John, 255, 250, 225

    rick, 225, 250, 250

    rock, 3, 182, 182

];

this is the code i used in test.qvw instead of b inline table you can use it as excel file

Below is the code i used in my background color

Test.JPG.jpg