How to made grafana pie chart by group of time

this sample pie chart,we made it in powerBI,
but we need to do this in Grafana,
we made piechart[A] already, but cannot made piechart by group of time
for FromGrid chart, we need to group time by Day = 06:00-18:00 / Evening = 18:05-22:00 / Night = 22:00-05:55 (next day)
for consume chart, group by Day = 6:00-18:00 / Night = 18:05-05:00(next Day)
i need to see difference value of each period
FusionsolarAPI–>InfluxDB—>Grafana
please help, how we can do this,
sorry for nor good english, thank you



have you found a solution in the meantime?

I am looking for something similar. I’d like to group the energy consumption over the time interval in the date/time picker. Is there a way to do that? Can I somehow reference the date picker in the $_interval parameter for the group by statement?