Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, Community!
How can I color line chart like on this pic? I have tried all scenario that I knew.

For this styled line chart does not work.
Hi,
I think it's possible by setup the color under expression (expand it by press '+' mark) -> Background color and use the defination.
Eager to know this !1
Hi,
What about this ?
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
Nice.