Changing the time representation on a Bar Chart

  • What Grafana version and what operating system are you using? 10.3.1 on Win 10

  • What are you trying to achieve? Trying to change the displayed time on the X axis from continuous 00:00’s to mm/dd with one per day.

  • How are you trying to achieve it? Using a Transform

  • What happened? Cannot get the format I wanted.

  • What did you expect to happen? An X-axis with days as MM/DD

  • Can you copy/paste the configuration(s) that you are having problems with? Done

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were. None.

  • Did you follow any online instructions? If so, what is the URL?

I have two queries producing two values PV1 and PV2 on the same time range.

I want a bar chart of PV1 & PV2 as a side-by-side bar-chart vs days. The time series bar chart only offers a stacked option hence my choice of the bar chart.

The Bar Chart produces the display I want perfectly but the X-axis shows each day as the midnight time 00:00. I can rotate the times so they are readable but what I really want is the date as MM/DD.

Here is the panel:

I tried to change the X Axis field but “Time” is the only offering or “First string”.

I have also tried “Convert field type” which does not seem the right one to use.

If I look at the data in the table the timestamps are complete. I cannot see why they are not displayable. Here is the table:

I am so close to what I want the chart to be and cannot see why the X-axis stubbornly remains with the midnight time. If I change the Group By to a smaller interval like 12hours then the graph is still correct but still only shows the times.

What is the solution please?