Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
beginner91
Contributor III
Contributor III

Line Chart Color

hello guys,

i tried to change the colors in my line chart, but it I couldnt. 

XY3 is my dimension and 1,2,3,4 is a counted number.

Like: count({<Phase={'1'}>}distinct(right([Name],9)))

i wanted to change the colors for the counted numbers.

1 Solution

Accepted Solutions
OmarBenSalem

I see:

1) if u have 4 measures; you MUST create the 4 Measures as master measures and assign color to each measure there (only and unique way to do it)

2) transform ur chart :

from : 1 dim , 4 measures

to : 2 dims, 1 measure

sthing like :

dim 1 :XY3

dim2: Phase

Measure : count(distinct(right([Name],9)))

or 

count({<Phase={'1','2','3','4'}>}distinct(right([Name],9)))

(depends on ur data)

and then u can:

a) assign the color for each value when u create ur Phase dimension as a master dimension

b) color by expression:

if(Phase='1',red(),

if(Phase='2',green() ...

Hope this helps

Omar BEN SALEM

View solution in original post

8 Replies
OmarBenSalem

Create ur dimension as a master dimension; then edit it and attribute the colors u want to every value:

Please refer to this video:

https://www.youtube.com/watch?v=5eucibmotOo

beginner91
Contributor III
Contributor III
Author

i cant because its already published
timpoismans
Specialist
Specialist

Make a duplicate, edit the app, re-publish it.

beginner91
Contributor III
Contributor III
Author

it doenst work because iam not the app owner. i need a expresion to change it.
i tried to do something like that: if(XY3='KW1', Phase='1', red())
but all lines are red now. i wanted to give each line a different number.
thank you.
OmarBenSalem

 

H

ow did u construct ur second dimension?

The one that has the 1,2,3 and 4 values? 

beginner91
Contributor III
Contributor III
Author

the 1,2,3,4 is no dimension. its a performance indicators:

count({<Phase={'1'}>}distinct(right([Name],9)))

and my dimension is:

XY3
OmarBenSalem

I see:

1) if u have 4 measures; you MUST create the 4 Measures as master measures and assign color to each measure there (only and unique way to do it)

2) transform ur chart :

from : 1 dim , 4 measures

to : 2 dims, 1 measure

sthing like :

dim 1 :XY3

dim2: Phase

Measure : count(distinct(right([Name],9)))

or 

count({<Phase={'1','2','3','4'}>}distinct(right([Name],9)))

(depends on ur data)

and then u can:

a) assign the color for each value when u create ur Phase dimension as a master dimension

b) color by expression:

if(Phase='1',red(),

if(Phase='2',green() ...

Hope this helps

Omar BEN SALEM

beginner91
Contributor III
Contributor III
Author

Thank you Omar. It worked!!!