I want to visualize my energy consumption using grafana - works fine so far. I use the JSON Plugin to get the data from my home automation system.
I have one panel where I select different timespans (last 24 hours, last 7 days, last 30 days, last year). I would like to group my data by time depending on the selected timespan:
Last 24 hours → group by hour (works automatically out of the box)
Last 7 days → group by day (works automatically out of the box)
Last 30 days → group by day (works automatically out of the box)
Last year → group by month → does not work (see attached screenshot)
How can I achieve my aim? In my mind it is not an option to group in the query itself, because the “aggregation level” differs depending on the selected timespan, but the query is static for the complete panel, right?