This needed few more modifications so that we can show all the values of last 7 days. Major change is the way relative time is calculated. Instead of calculating relative time wrt now(), we have calculated with _time itself. Thsi helped us in calculating the time wrt the indexed time value.
The modified search query
index="myindex" sourcetype="mysourcetype" "cpuoverall"
| stats values(cpuoverall) as cpu by _time, host
| eval time2 = relative_time(_time,"@h+1h")
| eval delta = "-22h,-20h,-18h,-16h,-14h,-12h,-10h,-8h,-6h,-4h,-2h,-0h"
| eval cpu_with_delta = mvzip(split(delta,","), split(cpu,","),":")
| mvexpand cpu_with_delta
| eval delta2 = mvindex(split(cpu_with_delta,":"),0), cpu2 = mvindex(split(cpu_with_delta,":"),1)
| eval _time = relative_time(time2,delta2)
| timechart span=1h values(cpu2) as "CPU Usage" by host
... View more