Template variable issues

Discussion about generation of graphs and tables
Post Reply
MrReview
Posts: 6
Joined: Sat Dec 17, 2011 11:39 am

Template variable issues

Post by MrReview » Sat Dec 24, 2011 1:49 pm

Hi,

I'm currently trying to create a Min/Max. Doing it for the current day, month and year works fine using the [actual_...] variable, but I'd like a table that displays min / max for the last 24 hrs, last 7 days, last 30 days and last 365 days.

It's still all very basic and rugged, but here's my pitch: http://www.cvdboom.de/cms/minmaxtable.html

If I got the manual right, [7D_hour1_th1_tempmin_1:--] should deliver the min temp of the past seven days, but it only returns the values of seven days minus one hour ago. The "real" temp min was on Dec 20 and is not displayed. Changing the syntax to a lower case "d" (=7d) does not return any values at all. Changing the resolution just gives me other, still wrong values. What is it that I'm missing?

B.t.w., why does [1D_day1_th1_tempmin_1:--] return a value while [1D_day1_th1_tempmintime_11_5:--] doesn't?

Any help is appreciated!

Thanks and Happy Holidays!
Chris

User avatar
admin
Site Admin
Posts: 332
Joined: Sun Feb 07, 2010 9:22 pm

Re: Template variable issues

Post by admin » Sat Dec 31, 2011 1:03 pm

I checked the explanation for time stamps in the "define chart" section of the wiki and it was not completely correct. I added some explanations there, which might also help you to understand what happens. http://wiki.meteoplug.com/Define_Chart# ... _Variables

In your example [7D_hour1_th1_tempmin_1:--] does not deliver the min temp of last seven days but the min temp of the first hour (00:00 - 00:59) of 25th of December (when today is 31st of December). As variables do give data just for defined resolution buckets, you can only get data for ranges predefined in size by the given resolutions: year1, month1, day1, hour6, hour1, min30, min15, min10, min5. To get the min temp of last 7 days is not possible with these kinds of variables. You can only get extreme data for any day, month, year, etc (which correspond to the predefined resolutions).

MrReview
Posts: 6
Joined: Sat Dec 17, 2011 11:39 am

Re: Template variable issues

Post by MrReview » Tue Jan 03, 2012 8:16 pm

Thanks for your efforts. That explains why all my attempts failed. Looks like I'll just have to do without a 7-day min-max table.

Cheers,
Chris

Post Reply