Charts Definition Language (CDL): Difference between revisions

m
no edit summary
mNo edit summary
=== The Chart block ===
CHART <id> TITLE [<word>...<word>] CONNECTSto [1 … 24]
[PLOT [ALL|RECENT] <Plotvariable> [[[CDL - EVAL|EVAL]] '[' <Expression> ']'
AS <Line Type>
COLOUR <HTML Color>
Temp, Wind, Distance, Hours, Solar, UV, Rain, Rrate, Pressure, Humidity, DegreeDays, EVT
 
This only has meaning if there is an [[CDL - EVAL|EVAL]] with a valid expression present. As an [[CDL - EVAL|EVAL]] may modify the value of the plot variable to something completely different, the original Axis belonging to that plot variable may be useless or scale wrongly. Therefore you can choose your own Axis. If there is no valid equation, a warning is given and no axis is generated.
 
In future a generic (without title or unit) Axis will selectable to accommodate plotting in combination with other variables.
#RECENT: Defines the variable to be governed by the CMX parameter ''GraphHours'' and are similar to the CMX RECENT graphs (though not equal).
#AS: Defines the type of charting for that variable.
#[[CDL - EVAL|EVAL]] [ ]: Defines an expression for the plot variable. The equation must be placed between the square brackets, space has no value here (does not act as separator).
#COLOUR: Defines the colour of that variable.
#ZINDEX: Defines the zIndex plane for that variable.
The keywords for the actual parameters and the Graph Types speak for themselves.
 
===== EVAL =====
The EVAL requires probably some explanation.
 
The equation is formulated between square brackets and is meant to modify a weather variable. Available to the user are functions, the weather variables and the mathematical operators +, -, * and /. Currently the only function available is SUM which incrementally sums up all data leading to the Growing Degree Days graph. Other functions will follow.
 
The following example shows the daily average temperature modified to the Growing Degree Days with an offset of 5 °C:
 
CHART GrowingDgreeDays TITLE TempSum with offset 5
PLOT ALL AverageTemp colour CornflowerBlue as column
PLOT ALL AverageTemp EVAL [ SUM(AverageTemp-5) ] colour green Axis DegreeDays
EndChart
 
===== STATS =====