Consumption by day on a Graph Panel

Hello,
I’m scraping metrics from kafka on Prometheus. I’m trying to make a dashboard where I can see the total of messages ingested by topic and by day, starting from midnight to 23:59. The result must look like this :

with each bar being the total of messages ingested starting from midnight.
The problem is that I only have this data with a sliding window of 24h, which means I have data from the previous day on each bar.

Here’s the prometheus query :

sum(delta(kafka_topic_partition_current_offset{job="kafka",topic=~"my_topic"}[24h])) by (topic)