TestTable: LOAD * Inline [ 'XValue', 'YValue', 1, 25 2, 21 3, 19 4,10 5, 5 6,3 7,-4 8,-8 9,-15 10, -16 ] ; EXIT Script ;
Add a Line Chart to your sheet, using the Xvalue and Yvalue for the dimension and measure.
In the Chart > Appearance > Presentation, select Area.
In Appearance > Colors and Legend, select 'Custom' and 'By measure'.
Click the fx and input
=If( YValue > 0, blue(), red() )
It could has been a good idea, but it's working only if reference point is 0.
Question asked of varying area color referring on 3.
I add that I'd like that colours of area could change depending on the value of another expression.
Is there some hope of achieve the goal with a simple line graph?
I find out D3 Visualization Library extension in Qlik Branch:
and using Difference Chart I was able to create my chart.
Unfortunatly, I cannot change x-Axis (no scroll bar) and this is very limiting for long historical series of data.
Anyone has some other suggestion?
In this case, color will change at walue 3, but area will start from 0 value.
Furthermore, colors in expression don't overwrite default colors.
This is what I managed to get.
prova.qvf 192.0 K