Charts Definition Language (CDL): Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
(3 intermediate revisions by the same user not shown)
Line 61: Line 61:
#PLOT: Starts the plot specification using one of the possible variables
#PLOT: Starts the plot specification using one of the possible variables
#[[CDL - STATS|STATS]]: Starts the statistics block using one of the possible variables. Semantics demands the variable to be plotted normally as well.
#[[CDL - STATS|STATS]]: Starts the statistics block using one of the possible variables. Semantics demands the variable to be plotted normally as well.
#RECENT: Defines the variable to be governed by the CMX parameter ''GraphHours'' and are similar to the CMX RECENT graphs (though not equal).
#ALL: Defines the variable to be taken from the [[Dayfile.txt|Dayfile]] and all data for that variable will be plotted (Note that the CMX parameter ''ChartMaxDays'' will not be used)
#ALL: Defines the variable to be taken from the [[Dayfile.txt|Dayfile]] and all data for that variable will be plotted (Note that the CMX parameter ''ChartMaxDays'' will not be used)
#RECENT: Defines the variable to be governed by the CMX parameter ''GraphHours'' and are similar to the CMX RECENT graphs (though not equal).
#DAILY: Identical to the ALL keyword but it sets the datarange for the chart to one month while the ALL keyword sets it to one year.
#EXTRA: Defines the variable to be an extra sensor variable. It has an implicit datarange of RECENT.
#AS: Defines the type of charting for that variable.
#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).
#[[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).
Line 71: Line 73:
#AXIS: Gives the user the possibility to specify an axis when using the EVAL construct otherwise an error is generated.
#AXIS: Gives the user the possibility to specify an axis when using the EVAL construct otherwise an error is generated.
#ENDCHART: End the chart definition
#ENDCHART: End the chart definition
#OUTPUT: Gives an optional name of an outputfile which starts at the chart where it is defined. Any chart after this OUTPUT specifier goes to this OUTPUT until another OUTPUT is found. Only the first OUTPUT specifier accepts click events as defined by CONNECTSTO.
#OUTPUT: Gives an optional name of an outputfile which starts at the chart where it is defined. Any chart after this OUTPUT specifier goes to this OUTPUT until another OUTPUT is found. Only the first OUTPUT specifier (implictly: cumuluscharts.txt) accepts click events as defined by CONNECTSTO.  


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.
Line 163: Line 165:
#ppm
#ppm


Translations for the axis titles come from the [Website] section and should require no additional effort.
Translations for the axis titles come from the [Website] section (until '''''EVT''''') and should require no additional effort.
Subsequent translations of axis titles come from the [Compiler] section (from '''''Free''''' onwards) and may require translation.


== Additional details ==
== Additional details ==
Line 169: Line 172:
#The Legend texts are implemented as translations of the PlotKeywords (the Plot Variables). You will find these in the translation file section [Compiler]. Legend entries can be multiple words (the keywords can not).
#The Legend texts are implemented as translations of the PlotKeywords (the Plot Variables). You will find these in the translation file section [Compiler]. Legend entries can be multiple words (the keywords can not).
#The width of the graph container is 100% of the viewport.  
#The width of the graph container is 100% of the viewport.  
#The height of the graph container can be specified in the options (not defined in the language to prevent overcharge):
#The height of the graph container can be specified in the initifile parameters (not defined in the language to prevent overcharge):
   [Compiler]
   [General]
   ChartContainerHeight=650 (Default)
   ChartContainerHeight=650 (Default)
#The Plot Variables Evapotranspiration, CoolingDegreeDays and Heating DegreeDays are not supplied by CMX in the JSONs. CumulusUtils provides those automatically when used in the definitions (on request) with the commandline parameter [[UserAskedData]]. See also [[ChartsCompiler#Operation|ChartsCompiler Operation]].
#The Plot Variables Evapotranspiration, CoolingDegreeDays and Heating DegreeDays are not supplied by CMX in the JSONs. CumulusUtils provides those automatically when used in the definitions (on request) with the commandline parameter [[UserAskedData]].  
#You have to schedule this command if you wish to use the FTP frequency CMX uses for its JSON's. Note that these JSON files specific to CumulusUtils '''always reside in the website root''' of CumulusUtils, even if you have more websites and define the ''CumulusRealTimeLocation''.
#All Extra Sensor Plotvariables are supplied by CumulusUtils through the commandline parameter [[UserAskedData]].
#For the commandline parameter [[UserAskedData]]: see also [[ChartsCompiler#Operation|ChartsCompiler Operation]].  
#You have to schedule [[UserAskedData]] command if you wish to use the FTP frequency CMX uses for its JSON's. Note that these JSON files specific to CumulusUtils '''always reside in the website root''' of CumulusUtils, even if you have more websites and define the ''CumulusRealTimeLocation''.
#If the  user uses different locales for CMX and CumulusUtils the monthly log filenames will be according to the locale of CMX. This creates an issue which is solved by the inifile parameter:
#If the  user uses different locales for CMX and CumulusUtils the monthly log filenames will be according to the locale of CMX. This creates an issue which is solved by the inifile parameter:
   [General]
   [General]
Line 181: Line 186:
== Example CutilsCharts.def ==
== Example CutilsCharts.def ==
The Chart definitions below is included in the distribution of CumulusUtils and serves as an example.
The Chart definitions below is included in the distribution of CumulusUtils and serves as an example.
(To be included)


<pre style="height: 700px; overflow:scroll; width:auto;" >
<pre style="height: 700px; overflow:scroll; width:auto;" >

Navigation menu