Chart with custom bar width for each time intervall

Hello everyone,

iam using grafana for some weeks now and really like it, but one thing i can not figure out:

Iam writing data of the last years to an InfluxDB database. This data i want to visualize with bars and each bar should represent the sum of a field, grouped by a certain time intervall. The problem is that those intervalls dont share the same length, e.g.:

intervall 1 = 01.01.2017 - 15.01.2017 (15 days)
intervall 2 = 16.01.2017 - 04.02.2017 (19 days)
intervall 3 = 05.02.2017 - 21.02.2017 (16 days)

Some intervalls are notably longer then others so its very important for me to see this by the width of the bar.

What i did was converting the dates i have to unix time and adding them to my queue e.g.:

[…] WHERE time>=1508709600000000000 AND time<1511132400000000000 […]

With that approach the chart looks like this:
Unbenannt

The bars start at the right position but they are drawn infinitely.

What i want to achieve is:
Unbenannt1
(i made that in paint)

I also tried to give the values in each time intervall a common tag and group by that tag, but then the bar for each tag is infinitely long in both positive and negative x-axis direction.

Maybe one of you guys got an idea and can help me with that one or got a tip what i might try next.

thanks in advance

You time series data should be grouped into even time intervals (With nulls or zeros for periods of missing data). The width of the bar chart is derived from minimum distance between two data points.

1 Like