Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Colors in styled line chart

Hi, Community!

How can I color line chart like on this pic? I have tried all scenario that I knew.

Новый рисунок.jpg

1 Solution

Accepted Solutions
Brice-SACCUCCI
Employee
Employee

Hi,

What about this ?

View solution in original post

7 Replies
rustyfishbones
Master II
Master II

this video may help

Qlikview Line Color Tip

Qlikview Conditional Line Color Tip by RFB 91 - YouTube

Not applicable
Author

For this styled line chart does not work.

Not applicable
Author

Hi,

I think it's possible by setup the color under expression (expand it by press '+' mark) -> Background color and use the defination.

sujeetsingh
Master III
Master III

Eager to know this !1

Brice-SACCUCCI
Employee
Employee

Hi,

What about this ?

Brice-SACCUCCI
Employee
Employee

Some details :

1. Create an area chart with 3 expressions :

- if((Value) < 0, sum(Value), 0) : Negative values, background color "white(0)" (transparent)

- 0 : 0 values, background color "Red()"

- if(sum(Value) >= 0, sum(Value), 0) : Positive values, background color "Green()"

2. You'll see that the lines are not continuous between Green and Red. You have to generate intermediate values when the line cross the 0 Y-Axis.

I do this in the script, using the Thales' Theorem!

ValuesTmp:

JOIN

LOAD

    fabs(PrevValue) * (Dim - PrevDim) / (fabs(Value - PrevValue)) + PrevDim as Dim,

    0 as Value;

LOAD

    num(Previous(Dim))    as PrevDim,

    num(Dim)             as Dim,

    Previous(Value)     as PrevValue,

    Value                 as Value

RESIDENT

    Values

WHERE (Previous(Value) * Value) < 0; // Only compute when the sign of the value changes

Not applicable
Author

Nice.