Line graph does not display as expected

I am using MySQL data source to show graph panel.
Below is the query:

SELECT time_sec as time_sec, instace as metric, count as value FROM chat_stats WHERE api = ‘Send message’ ORDER BY count desc, time_sec asc LIMIT 20

In the graph, line connects from 11Feb to 13Feb and then 12 Feb, where as I would expect the line to connect in the order of date in x axis

Hi,

Your order by looks like it can be the problem.

SELECT time_sec as time_sec, instace as metric, count as value FROM chat_stats WHERE $__unixEpochFilter(time_sec) AND api = ‘Send message’ ORDER BY 1, 2 LIMIT 20

Marcus