Setting a color on the last parameter

I am using grafana v 10.4.1 installed locally on a debian system

Analysing data from my solar panels, I am plotting cumultative production using this query from a postgreSQL database:

select to_char(time::date,‘YYYY-mm-dd’) as parameter, now()::date+time::time as time,
sum(ppv_total/12) over (partition by time::date order by time) as " " from pv where pv.time > now() - interval ‘7 days’ order by
time;

time is the field for storing the time, ppv_total is the momentary production from the panels. By doing the now()::date+time::time, I am moving the data to the current date.

This is working exactly as planned and by setting the relative time to +48h and time shift to 24h, I get this plot:

The problem is that it is difficult to see todays data. I could of course set another line style on today’s (2024-03-24) data, but that would mean that I have to change it every day. Is there any possibility of telling grafana to use a certain line style on the last dataset, so that today it will be used on 2024-03-24, tomorrow on 2024-03-25 etc. I can of course make an extra query just pulling out today’s data, and setting a style on that data set, but if possible to use just one query, I would prefer that.

Hello @mortensickel,

I’m not sure of what you’re asking but I’ll give it a try.
If you just want to see the latest collected data, you can do it on the legend.
Selecting the last* option on the legend settings:
image

You should be able to have something like:
image

This might be a workaround for what you want?

Regards

Then I was not explaining good enough what I wanted to do.

What I would like to do is to have an override on the last parameter (which also happens to be $TODAY), so it always comes out with a easily visible line. I did it by having a separate query for those data, so I could set the line width and line color:

One query has “where time > now() - interval ‘7 days’ and time < now()::date”
The other query has “where time > now()::date”