Charts Definition Language (CDL): Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
(10 intermediate revisions by the same user not shown)
Line 20: Line 20:
== The Language ==
== The Language ==
=== The Chart block ===
=== The Chart block ===
   CHART <id> TITLE [<word>...<word>]  CONNECTSto [1 … 24]
   CHART <id> TITLE [<word>...<word>]   
  HAS WINDBARBS [ ABOVE | BELOW ]
    CONNECTSto [1 … 24]
    HAS WINDBARBS [ ABOVE | BELOW ]
    ZOOM <Integer>


  [ PLOT [ALL||DAILY|RECENT|EXTRA] <Plotvariable> [ [[CDL - EVAL|EVAL]] '[' <Expression> ']' ]
    [ PLOT [ALL||DAILY|RECENT|EXTRA] <Plotvariable> [ [[CDL - EVAL|EVAL]] '[' <Expression> ']' ]  ]
  | [ [[CDL - STATS|STATS]] [ALL||DAILY|RECENT|EXTRA] <Plotvariable> <Stats Type> ]
             AS <Line Type>  
             AS <Line Type>  
             COLOUR <HTML Color>
             COLOUR <HTML Color>
Line 30: Line 33:
             OPACITY <Integer>.<Integer>
             OPACITY <Integer>.<Integer>
             AXIS <Axis Type>
             AXIS <Axis Type>
  ]
  [ [[CDL - STATS|STATS]] <Plotvariable> <Stats Type> ]


   PLOT blocks repeated
   PLOT blocks repeated
Line 51: Line 52:


The output specifier gives the user the possibility to define charts as he likes and to place these in the menu wherever he likes. In the [[Website Generator]] the placements of the charts at the moment will be limited to the [[User Defined Menu]]. In modular use the user can do whatever he likes with the resulting files. In the website the charts require the datafiles to be in the current directory.
The output specifier gives the user the possibility to define charts as he likes and to place these in the menu wherever he likes. In the [[Website Generator]] the placements of the charts at the moment will be limited to the [[User Defined Menu]]. In modular use the user can do whatever he likes with the resulting files. In the website the charts require the datafiles to be in the current directory.
=== Info specifier ===
A free helptext can be specified after the chart using this keyword:
  INFO " This is a free HTMLformat helptext which can contain an axplanation of the chart "
The double quotes around the helptext are obligatory and must be enclosed by spaces.


=== Keywords ===
=== Keywords ===
Line 61: Line 67:
#CONNECTSTO (Optional construct): The integer numbers which follow CONNECTSTO represent a pane in the realtime [[Dashboard|dashboard]]. When clicked on that pane this chart appears. This is only valid on charts in the default output. For other outputs there is no semantics for CONNECTSTO and a warning is issued in the logfile if it is specified in any second or higher output.
#CONNECTSTO (Optional construct): The integer numbers which follow CONNECTSTO represent a pane in the realtime [[Dashboard|dashboard]]. When clicked on that pane this chart appears. This is only valid on charts in the default output. For other outputs there is no semantics for CONNECTSTO and a warning is issued in the logfile if it is specified in any second or higher output.
#HAS WINDBARBS [ ABOVE | BELOW ] (Optional construct): Defines if the chart displays the WINDBARBS showing direction and speed as indicators (this is not an exact plot of wind). Above | Below specifies the place in the chart.
#HAS WINDBARBS [ ABOVE | BELOW ] (Optional construct): Defines if the chart displays the WINDBARBS showing direction and speed as indicators (this is not an exact plot of wind). Above | Below specifies the place in the chart.
#ZOOM (Optional construct): Indicates which range selector button is the default when the chart is displayed; Defaults depend on chart range.
#PLOT: Starts the plot specification using one of the possible variables. Each chart requires at least one PLOT.
#PLOT: Starts the plot specification using one of the possible variables. Each chart requires at least one PLOT.
#[[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.
Line 71: Line 78:
#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.
#LINEWIDTH: Defines the linewidth for that variable.
#LINEWIDTH: Defines the linewidth for that variable. When the chart type is ''scatter'', this attribute defines the radius of the points.
#OPACITY: Defines the opacity for that variable (important for area and column graphs)
#OPACITY: Defines the opacity for that variable (important for area and column graphs)
#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 (Optional construct): 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 (implicitly: cumuluscharts.txt) accepts click events as defined by CONNECTSTO.  
#OUTPUT (Optional construct): 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 (implicitly: cumuluscharts.txt) accepts click events as defined by CONNECTSTO.  
#INFO (Optional construct): Introduces a helptext section for the chart. The free text is enclosed in double quotes and cannot contain double quotes. The double quotes are delimited by a space character.


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 174: Line 183:


== Additional details ==
== Additional details ==
#All parameters can be combined in one graph with the corresponding axis automatically added. Only when scatter is defined as Line Type it is forbidden to combine it with one of the other possibilities. This may change in future.
#All parameters can be combined in one graph with the corresponding axis automatically added. <s>Only when scatter is defined as Line Type it is forbidden to combine it with one of the other possibilities. This may change in future.</s> The scatter combination with other charts types is now available but may be subject to change.
#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.  
Line 231: Line 240:


Chart Overzicht Title Overzicht van de huidige weerstatus ConnectsTo 2 4 15 20
Chart Overzicht Title Overzicht van de huidige weerstatus ConnectsTo 2 4 15 20
Has WindBarbs Above
   PLOT Temperature Colour #058DC7 zindex 90
   PLOT Temperature Colour #058DC7 zindex 90
   PLOT DewPoint Colour #50B432 zindex 80
   PLOT DewPoint Colour #50B432 zindex 80

Navigation menu