Time shift a bar graph from now back until full day

Hi, I’m struggling with getting a bar graph to work the way I want.

Basically I have traffic data stored as total bytes transferred, which is logged once every minute. I want to present a bar graph showing me how much transferred per full day (24h, 00:00-24:00). I also want this series to show me all days that are included within the current time window selected, but should backfill this panel to the full 24h.

The way I do it now is:

SELECT non_negative_derivative(max(“rx_bytes”), 24h) FROM “wan1” WHERE $timeFilter GROUP BY time(24h) TZ(‘Europe/Stockholm’)

And then, to shift it to full days I use timeshift = 1d/d. This work somewhat, but it doesn’t give me the current day (up until current time), since it will be shifted to last midnight.

Using relative time of now/d gives me the behavior I want, but then the time window is fixed to that relative time and I can extend it to several days. Is there some way to achieve this? All my search has turned out empty.

I could of course use two panels, one for “today” (using relative time) and one for the historical days (using time shift) according to the time window, but it would be cleaner if I could just adapt the one panel like explained.

Any pointers is appreciated!