X-axis to show week only

I am using Grafana 7.5.4 on to visualize values of my mysqlDB.
results in:

As I am grouping by week I also want the time axis to show the week only. Is there a way to achive this? If so…how :wink: ?

Hi @grafahna

I think you might need to use the categorical Bar Chart:

This will let you use arbitrary strings, like Week 1 and so on…

1 Like

Good day, took a whilke until I came back to my project…Txs for your hint. After upgrading to Grafana 8.3.3. I found the BarCharts but got stuck with another simple thing.
Using a transformation I converted my Time to a string, which gives me one column per week. But how can i change the wierd string to week # ?

@mattabrams As I am still stuck I try to be more precise about my issue hoping to get help again.

I need to analyze traffic data, currently 1.500.000 datasets (increasing by 40.000/week) stored in a MySQL DB. Graphs are working in general and Grafana performs pretty well, even zooming between dates is of good performance, however there is one Graph I am unable to produce.

I need to get numbers (e.g. # of vehicles) by yearweek which I was able to get by using BarChart and a transformation,

however I did not find any way to replace the UNIX timestamp I get in the X-axis now, by the yearweek

This is what I get so far:

This is what I need: i.e. the yearweek instead the unix timestamp on the X axis (Graph for illustration cheated by using paint)

This is an extract of how the table looks like

hmmm…nobody knows? Looks like I have to go back to Excel :frowning:
Database is MySQL btw

you could calculate the range of unix timestamps for each week and then set up value mapping for that range to week 30 or 31. You’d have to hardcode it but it would work…