Charts Definition Language (CDL): Difference between revisions

m
no edit summary
mNo edit summary
Line 18: Line 18:
=== The Chart block ===
=== The Chart block ===
CHART <id> TITLE [<word>...<word>]  CONNECTSto [1 … 24]
CHART <id> TITLE [<word>...<word>]  CONNECTSto [1 … 24]
   [PLOT [ALL|RECENT] <Plotvariable> [EVAL '[' <Expression> ']'
   [PLOT [ALL|RECENT] <Plotvariable> [[[CDL - EVAL|EVAL]] '[' <Expression> ']'
             AS <Line Type>  
             AS <Line Type>  
             COLOUR <HTML Color>
             COLOUR <HTML Color>
Line 84: Line 84:
       Temp, Wind, Distance, Hours, Solar, UV, Rain, Rrate, Pressure, Humidity, DegreeDays, EVT
       Temp, Wind, Distance, Hours, Solar, UV, Rain, Rrate, Pressure, Humidity, DegreeDays, EVT


This only has meaning if there is an EVAL with a valid expression present. As an 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.
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.
In future a generic (without title or unit) Axis will selectable to accommodate plotting in combination with other variables.
Line 106: Line 106:
#RECENT: Defines the variable to be governed by the CMX parameter ''GraphHours'' and are similar to the CMX RECENT graphs (though not equal).
#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.
#AS: Defines the type of charting for that variable.
#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).
#[[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.
#COLOUR: Defines the colour of that variable.
#ZINDEX: Defines the zIndex plane for that variable.
#ZINDEX: Defines the zIndex plane for that variable.
Line 117: Line 117:
The keywords for the actual parameters and the Graph Types speak for themselves.
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 =====
===== STATS =====