$__timeGroup error

Hi,

first of all sorry by my inglish,
i am using grafana to monitoring two electric devices of one of my clients.

Grafana is 5.1V running on ubuntu 17.04 and the datasource is Mysql
this is the query

--
SELECT
$__timeGroup(FECHA,‘10m’,0) as time_sec,
VOLTAJE12 “VOLTAJE12”,
VOLTAJE23 “VOLTAJE23”,
VOLTAJE31 “VOLTAJE31”
FROM analizadorredes
WHERE $__timeFilter(FECHA) AND ID = 1
ORDER BY FECHA asc
-
-

i amd using $__timeGroup(FECHA,‘10m’,0), to be able to see the disconnection of devices like 0V in the Y axis.

What do I expect?

i expect that the dashboard look always like:

What do I get?
sometimes i get a dashboard that looks like:

in the last picture, you can see that auto-axis does not work properly, this is because, the $__timeGroup macro add a data-point, to the start of the data set.

thanks!!

If you leave out the 3rd parameter it shouldnt do that. The 3rd parameter is the value that gets inserted if there is no data for that interval.

$__timeGroup(FECHA,'10m')

Yes, i know.

and i want grafana to insert values, but not in the start of the interval

i guess the problem is you dont have values in the first interval. to fix this you would have to rewrite the query to align the start of your timeselection in the query with your interval