How to fixed day series in mysql

i have seen the solution on adding series queries in mysql here:How to add Time series queries with grafana and MySQL?
but what confused me is how to add time series with day, my sql table like this:

mysql> DESC ams_fail_test;
±------------±--------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±------------±--------±-----±----±--------±---------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| date_insert | date | NO | | NULL | |
| fail | int(11) | NO | | NULL | |
±------------±--------±-----±----±--------±---------------+

but when my select statement like this:

SELECT
UNIX_TIMESTAMP(date_insert) as time_sec,
fail as value,
‘fail’ as metric
FROM ams_fail_test
WHERE $__timeFilter(date_insert)
ORDER BY date_insert ASC
which shows like this:

one day is divided to several pieces, but what i expected is one day is one piece. i konw we can click the zoom button on the right top, but can it be fixed manully?can anyone help me? thanks~

Hi,

Seems to me like you have a data point per day so not sure what you want besides this. I would suggest looking into macro function $__timeGroup.

Marcus