I am facing issues with bar graphs when data source is one of PostGres or Mysql.
This problem persists both in Mysql and Postgresql.
The issue is visualized like this: (the image is intentionally in
day interval so that I can show you the problem. Otherwise it still persist when it is aggregated monthly)
This problem exists when I use pure sql like this
date_trunc('month', dateColumn) as time or like this ‘unix_timestamp(date_format(dateColumn, ‘%Y-%m-01’)) as time’ and this problem rises when one bar is missing a data point for a metric. There is no way of indicating what to do with
missing data point for a metric in specific interval in pure sql. As a solution Grafana has timeGroup and it can be used like this
$__timeGroup(dateColumn, '43800', 0). But this form also has issues. It tries to put the center of the bar on the first day of the month which causes the aggregation to happen for instance from 01-21 till 02-19 instead of 02-01 till 02-28.
Is there any way that I can get graph bars aggregated correctly from first day of month till end day of that month with out having a visual mistake?
Grafana Version: Grafana v5.3.2 (0d821d0)