- What Grafana version and what operating system are you using?
- Version 22.214.171.124
- What are you trying to achieve?
- Visualize a bar chart by X-axis represents datetime and Y-axis represents value.
- How are you trying to achieve it?
Setup datasource as MS SQL and put the SQL command as below.
FORMAT(CONVERT(DATETIME, [Datetime]), ‘yyyy-MM-dd’) AS [Date],
WHEN TRY_CONVERT(FLOAT, [ACP_PTHP_01_PV]) < 0 THEN 0.0
ELSE TRY_CONVERT(FLOAT, [ACP_PTHP_01_PV])
END) AS AVG_ACP_PTHP_01_PV
FORMAT(CONVERT(DATETIME, [Datetime]), ‘yyyy-MM-dd’)
It’s working well in MS SQL Studio with showing the correct output but once need to visualize a bar chart it has nothing to show just only X-axis shows datetime and Y-axis shows number data correctly. In addtions, once move a mouse hover on a graph there always show “Invalid Date”.
- What happened?
No any bar chart appear on a graph and when using mouse hovering on graph then will see “Invalide Date” message even inspect at Query Inspector the data already shows for example.
What did you expect to happen?
I want the bar chart display on graph associated with the data that perform query.
Can you copy/paste the configuration(s) that you are having problems with?
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
Did you follow any online instructions? If so, what is the URL?