Cant draw multiline graphs in Grafana new versions

Hi all,
I am using Grafana 10.1.1. I am trying to get a multiline chart like below.

Above chart is received from grafana 7.3
But In 10.11 its just received one line if I execute same query which I used in grafana 7.3.

Related Query.

SELECT

UNIX_TIMESTAMP(time) as time_sec,convert(action,CHAR(20)) as metric ,

SUM(hits_count) as “Action Count”

FROM scm_host_op_sp_service_action_channel_errorcode_wise_tps_hourly

WHERE

$__timeFilter(time)

Group by time,action

Thanks.

What is your datasource?Try the following

SELECT

UNIX_TIMESTAMP(time) as time,
convert(action,CHAR(20)) as metric ,
SUM(hits_count) as “Action Count”

FROM scm_host_op_sp_service_action_channel_errorcode_wise_tps_hourly

WHERE

$__timeFilter(time)

Group by time,action

Also make sure the fornat of the query is Time Series and not Table.

Also check that you do not have some Transformation that might having an effect on visualization

Hi, DataSource is MySQL. Finally got the solution. I transform it.


Then my yable in grafana change it as below.

Then I can draw multiline charts.

Thanks.

1 Like