Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Sant
Contributor II
Contributor II

How to add Background shading on plots ?

Hi Qlik Community,

          Need help to add background shading in a Line Chart (as in attached image).

X-Axis : Date

Y-Axis : Mean value of a measure on each date

 

Additional Dimension 1 : Not part of X / Y Axis. But I need multiple line graph based on this Dimension - This is already achievable with line chart. ( I couldn't, if I try Combo Chart)

 

Additional Dimension 2 : Not part of X/Y Axis. I need to use this Value to define shading color. This value varies with X-Axis (Date)

For Example : Temperature during those time-period

Sant_0-1704431149962.png

Thanks in Advance !

 

Labels (4)
2 Replies
Anil_Babu_Samineni

@Sant   With native layout this is not going to meet 100%, but IF you have Area chart with Dimension available and if you use that as dimension you can make it work nearby.

Please share the sample QVF so we can work with that.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vinieme12
Champion III
Champion III

Use a combo chart to achieve this, the idea is to overlay a line chart on top of a Bar Chart

 

vinieme12_0-1704698091242.png

 

Example

Measures:

1) For the Background; add measure

Length of Bars  =1  (Scale to 100%)

Under More Properties for this measure >> Choose Colors >> By Expression

add background colors right to left (highest to lowest)

=if( <x-axis dimension> 27 , rgb for green
,if(i<x-axis dimension>22,rgb for orange
,if(i<x-axis dimension>16,rgb for blue

..and so on... , rgb for lightgreen ) ) )

 

 

2) Height of Line = Your Expression for line chart

 

3) Under Presentation>Styling > Bar

drag slider all the way to 1 

 

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.