Empty columns when grouping by time (influxDB)

I am not sure if this is a bug, more artifacts.
It is related to grouping data by time (InfluxDB/grafana) and how this grouping (buckets) are made.
I have data that is stored on a monthly basis - lets say every 5th of given month.
So there is one number per month. I need to display those number preferably using bar charts.
Today is 28th of September - last data is from 5th of September - so less than 30 days. I run a query “Select count(my_field) from my_measurement where time > now() - 90 days group by time(30d)”

I got this time of graph:

I have tried to display the data using bar chart plugin or time series plugin. I always get 1 column that tells 0 - which is very misleading since there is data from last 30 days.

If I check what data is fetched from influx it looks like that:

“select count(*) from flaky_failed_monthly where time> now() - 30d group by time(30d)”
{
“results”: [
{
“statement_id”: 0,
“series”: [
{
“name”: “flaky_failed_monthly”,
“columns”: [
“time”,
“count_failed_count”,
“count_flaky_count”
],
“values”: [
[
“2022-08-26T00:00:00Z”,
45,
45
],
[
“2022-09-25T00:00:00Z”,
0,
0
]
]
}
]
}
]

There is always “empty” bucket - which is very misleading, because if I show this data - people who look at it, believe there is no data from last 30 days.

Is there some workaround to hide this empty column? I understand it is how the data is organized in those 30 days intervals, how those “buckets” are created but the information I got is simply very misleading it suggests there is no data, while it is, and I would like to be able to somehow display it more realistically.

to anyone with same issues - I have found workaround - using old graph plugin (i have old dashbaords from older grafana versions):


Probably it is not recommended - but I just cannot show misleading graphs, after all it is about information displayed, not technical reasons.

2 Likes