I am using Grafana 10.4.3 with MySQL, and below is the query I am using,
SELECT
$__timeGroup(`CreatedDate`, '60m', 0) as `time`,
SUM(`Value`) as `value`
FROM
Order
WHERE
$__timeFilter(`CreatedDate`)
GROUP BY
time
ORDER BY
time
As stated from the doc, using $__timeGroup(CreatedDate, ‘60m’, 0) should fill missing point as 0. However, the chart generated still didn’t have the missing point but only point that have data. Is this a bug or my problem? Thanks.
1, yes
2, The data shown in the table has missing point same as the result query returned. AFAIK, the missing point is “patched” by Grafana after query returned but seems it didn’t. The query shown in query inspector as below,
SELECT
UNIX_TIMESTAMP(CreatedDate) DIV 86400 * 86400 as time,
SUM(Price) as value
FROM
Order
WHERE CreatedDate BETWEEN FROM_UNIXTIME(1713371829) AND FROM_UNIXTIME(1715963829)
GROUP BY
time
ORDER BY
time