How to change MySQL data from Table format to Graph from grafana Tool

Hello Team ,
Could you please help me to change the below MySQL query from Table format to Graph.I tried my level best. But no success.

select A.work_order_type,B.name,COUNT(B.name) AS TOT_WS_NAME,A.status
from vv_work_order A
INNER JOIN vv_work_order_types B
on A.work_order_type = B.id
GROUP BY 1,2,4;

By using above syntax i am able to see the data as Table format.But not from GRAPH.
Can any one modify this statement and share to me.
Thanks in advance.