I wanted to change how the x-axis is displayed. Change the way the dates are displayed in dd/mm/time to just the day of the week
Hi @nivekc Try the override of the units to be time:dd ( you will have to type it in, as it is not in the list of choices).
Unfortunately, I have found it only works (for me) on tables. Maybe one of the Grafana staff can comment on if it should not work on other visualizations.
Thanks Grant, I’ve been playing around trying to get this to work for a fair while.
@grant2, Thank you so much for taking your time on this. I tried your solution and yes it only works when I change it to a table. But on trying to implement it on the visualization, it reverts back to the day and time format.
On changing it to time:dddd it looks like this as a table
But on switching to Bar chart visualization it produces this output
@mattabrams @samcoren or anyone at Grafana: Can anyone comment on if the day of week time format should work on other visualizations (besides Table, where it works fine)?
I’ve brought this to the teams to double check, but I’m fairly sure there isn’t a way to adjust the appearance of the time on the x-axis with the time-series panel.
You can use strings on the x-axis for the bar chart, not bar gauge, so I was able to duplicate this table and, without changing anything, it worked OK for bar chart…maybe?
https://play.grafana.org/d/_ovpFVYnz/day-of-week-test?orgId=1
the tooltip in the timeseries displays the day of week, but not the x-axis.
I even tried overriding GF_DATE_FORMATS_FULL_DATE=‘DDDD HH:mm:ss’. Interestingly, that gives the day of the YEAR. This shows on the tooltip, and the date-picker, but has no impact on the x-axis in the time-series, alas…
might be a worthy feature request?
@mattabrams
Yes, for bar charts it works just fine. The limitation comes in the time series.
Yes, I think it might be worth a feature request. Thanks.
Hi grant2, I have a little bit the similar problem, but I want to add to X axis just DD/YYYY. Do you have any idea ? This is what I have now
Hi Bartosz,
AFAIK, there isn’t a way to adjust the appearance of the time on the x-axis with the time-series panel.
Hi,
try to use:
time:DD/YYYY
It works on Grafana 9.4.3
capital letters had to be used thanks Guys
where did you make this change , I tried using transform but it’s not working there…
@ankurnigam: you need to use an “override” to override the standard settings.
For example, in my case:
(see the “Override 2”)
I hope it helps.
Ciao
Hi,
I am still on Grafana 7 (7.5.17) as it is hosted by a third party. I am trying to achieve the same. In v7, the new bar chart is not available yet, only the “Bar Gauge” and the “Graph” which can be used with bars.
I tried to add the overrides mentioned in the comments here, but without success. There even is an override format called “Days”, but this also does not change the display on the X-Axis nor the hover tooltip.
Did anyone achieve this using these “old” Visualisations?
Thanks & best regards
Philipp
modify server config file : grafana.ini or defaults.ini
ddd means week,you can modify interval_day = ddd MM/DD
[date_formats]
interval_second = HH:mm:ss
interval_minute = HH:mm
interval_hour = MM/DD HH:mm
interval_day = ddd MM/DD
interval_month = YYYY-MM
interval_year = YYYY