Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

beginner91
New 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.

Tags (3)
1 Solution

Accepted Solutions
Partner
Partner

Re: Line Chart Color

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

8 Replies
Partner
Partner

Re: Line Chart Color

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
New Contributor III

Re: Line Chart Color

i cant because its already published
timpoismans
Valued Contributor

Re: Line Chart Color

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

beginner91
New Contributor III

Re: Line Chart Color

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.
Partner
Partner

Re: Line Chart Color

 

H

ow did u construct ur second dimension?

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

beginner91
New Contributor III

Re: Line Chart Color

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

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

and my dimension is:

XY3
Partner
Partner

Re: Line Chart Color

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
New Contributor III

Re: Line Chart Color

Thank you Omar. It worked!!!