• Welcome to TodayPlus Boards v2.

10-Day Temperature Chart

Started by uk_skinner, March 11, 2005, 04:47:37 PM

Previous topic - Next topic


This is a short instruction to get 10-Day Temperature Chart.

If you would like to know "evolution" of this idea, please read the thread.

The basic url address is: http://tpfans.com/rss/TpTempchart.php?Citycode=Citycode&Para=x,y,width,height

The following parameters are "required".

Citycode: Well, it is the citycode you got from weather.com.  For example: USMD0347.

Para:         There are 4 numbers separated by ",".
          x: horizontal offset of the chart
          y: vertical offset of the chart

          width: the width of the chart
          height: the height of the chart

   If you have the temperature label for the y-axis, you can adjust the "x" to accommodate different font sizes.  To accommodate the label at x-axis, I added "25" pixels of the height to the image.  The same "25" pixels also was added in the width.  So the size of the image should be: ("x+width+25" x "y+height+25").  

   Example, "Para=20,20,250,150" will give you a chart with (250 x 150) start at (20,20) and the size of output image is (20+270+25) x (20+150+25) = 315 x 195.  Please adjust the size according to your device (QVGA or VGA) and desired display area.

Option parameters
   The follow ones are optional.  You don't have to specify it if you are happy with the default settings.

U: unit of temperature, F: Fahrenheit, this is default; C: Celsius.

DOW: This one is to specify the format of "Day of Week". Use "DOW=X" to show one-word abbreviation (S,S,M,T,W,T,F) and "DOW=XX" for (Su,Sa,Mo,Tu,We,Th,Fr) and "DOW=XXX" for (Sun,Sat,Mon,Tue,Wed,Thu,Fri). The default is "XXX".

Lang: This one is to specify the language for DOW.  Three other languages (GM,FR and NL) are supported.  The default is EN.

Color:  You can specify the colors using the following parameters.
F_Color: Specify the RGB color of the frame. Default: 15,196,15
T_Color: Specify the RGB color of the Temperature line. Default: 196,15,15
R_Color: Specify the RGB color of the Real(or feel-like) Temperature line. Default: 15,15,196
L_Color: Specify the RGB color of the label. Default: 0,0,0

Font size:  The font size of the labels can be specified.
XFont: The support sizes are 1-5. Default:1
YFont: The support sizes are 1-5. Default:1

Freeze Point line
FP: To not show the freezeing point line, use "FP=N".  The default is "Y".

Y-Axis grid lines
YS: To specify  the numbers of grid lines, use "YS=number".  The default is "5".  If spcify "YS=0" then no grid line will be drawn but the "temperature" will show at each point.

Example: http://tpfans.com/rss/TpTempchart.php?Citycode=USMD0347&Para=16,4,300,200&R_Color=150,190,2004&T_Color=196,15,15&La_Color=0,0,0&F_Color=30,160,0&YFont=2&XFont=2&YS=4&DOW=XXX&FP=N


The output image format is PNG with transparent background.  Add url and file pathway into your radar.txt.  Here is an example:

STOR=\My Documents\Radar\r1.png


Quote from: "uk_skinner"
Freeze Point line
FT: To not show the freezeing point line, use "FT=N".  The default is "Y".

:D Too much parameters ? FT = FP ?

Regards Broesel



            Thanks.  :oops:  :shock:
            Yep, and it is Friday...



Very Impressive !!   Great Work.....  

"The most knowledgable person in the world is not the one who possesses the most knowledge, but the one who surrounds themselves with the greatest number of knowledgable people"


Once again, you guys are stretching the limits of our fine little application.  We just aren't worthy...   :bow:   But Thanks anyway.  I'm sure we'll use it.   :dance:
Toshiba e800, PPC2003 SE, 2.2 Gb MicroDrive, 512 CF, 512 SD, 2 Extended Batteries, Plus other excentric goodies.