Hello everyone,
I have Grafana version 9 and I want to display the values on the X-axis differently of the two selected variables. The first variable represents the interval between two columns: “hour, day, month, year”. and the another one for the format I would like to show: “YYYY, YYYY-MM, YYYY-MM-DD, YYYY-MM-DD HH:00”.
The date sent from my PostgreSQL to Grafana is in char format and I set different aggregation at query level. Unfortunately, the values on the X-axis are showed in UNIX timestamp, as you can see from the following screenshot:
In detail the part of json that isn’t working properly:
This is an example of the result I would like to get replicated on each variable selected, called “aggregation” and “axis_time” :
Thanks in advance for everybody that will help me.
Hi,
same problem on my Grafana 9.4.7
if you specified time formatting without variable (Eg. Time: YYYY-MM-DD or YYYY-MM) it works properly, but using variable it prints an incomprehensible string (same of your, which seems to have unix the timestamp in it).
the curious thing is that variable can be used anywhere for example on the title of panel
I have a really similar problem. Does anyone have a solution out there? Thanks
Hi everyone, and for the new people, welcome to the foruns.
But sadly, I’m sorry to say that Panel Options aren’t “variable aware” so currently there’s no way to do what you’re trying.
That’s awareness is an old issue/need but, ASFAIK, the implementation for variables on the Grafana’s code make it really hard for the team to even consider it. (I remember somewhere here in the forum and on the Github issues some ppl from the team explaining a bit of it.)
An old issue for Thresholds for example, where setting the max and min dynamically via a “Query Variable” would be awesome, but the team even created a transformation to do it instead of making Panel Options “variable aware”: Config from query results.
The best solution here would be rethinking the idea of what you want to show on the visualization. Maybe, for example, using two Graphs side by side on the @matteozuracki and @joaodl2 cases.
1 Like