| noop | stats count | fields
| eval num=mvrange(0,40,1) | mvexpand num
| eval _time=relative_time(now(),"-".num."d@d")
| eval day=strftime(_time,"%A - %F")
| timechart span=w count,list(day)
Have your search time range be at least: earliest=-40d@d latest=now otherwise you confuse the embedded bucket command by presenting data that's not in the time range.
Play with changing the anchor on earliest to @w0,@w1,...,@w5,@w6 and check out the results.
Update: A method that does not involve manipulating earliest, change _time, then use chart instead of timechart:
| noop | stats count | fields
| eval num=mvrange(0,40,1) | mvexpand num
| eval _time=relative_time(now(),"-".num."d@d")
| eval day=strftime(_time,"%A - %F")
| eval _time=relative_time(_time,"@w6")
| chart count,list(day) by _time