I am using the latest Grafana and i wonder if there is a way to filter on the x-asis like only “day and month” no time or “month and year” no time or only “year.”
Create a query and assign override for Time field. For Add override property choose Standard options > Unit and set it to time: DD/MM. The output format will be <day_number>/<month_number> like on picture.
Note: Data is grouped by day GROUP BY time(1d). If you want to show all dates (a.k.a. bar labels) then you need to set Bar labels minimum spacing to None (click on tab All -> Bar chart -> Bar labels minimum spacing -> None). Also, in Bar chart options you can set Show values to Always and change Text size to get bigger numbers above bars. All this is useful only if you are showing few bars on panel (but you can always group data to get less bars).
Result:
First panel shows time axis in DD/MM format (day and month in numbers), second MM/YY (month and year in numbers) and thrid YY (only years in numbers). Panels are set to show Last X days/months just to show different formats.
Important:
Uppercase letters will always show days, months, years in numbers while lowercase letters will show days, months, years as strings (there are some excaptions like MM = 01 while MMM = Jan). Note: string / can be changed by any character or string.
Time format , Output format
time: DD/MM/YY , 28/01/23
time: DD/MM/YYYY , 28/01/2023
time: ddd/MMM/YY , Sat/Jan/23
time: dddd/MMMM/YYYY , Saturday/January/2023
The more letters you specify the more detailed format you will get.