ChartsCompiler: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
1,588 bytes added ,  13:39, 2 May 2021
m
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
   |__TOC__
   |__TOC__
   |}
   |}
The ChartsCompiler is the "next-generation" method of creating charts for websites on the basis of CumulusMX based systems. Charts are defined in a dedicated [[Charts Definition Language (CDL)|Charts Definition Language]] and compiled into a file containing both the HTML/javascript menu infrastructure as well as the Highcharts javascript code to create the charts. Data - JSON files as produced by CumulusMX - is assumed to be present in the directory  from where the page is called.
The ChartsCompiler is the "next-generation" method of creating charts for websites on the basis of CumulusMX based systems. Charts are defined in a dedicated [[Charts Definition Language (CDL)|Charts Definition Language]] and compiled into a file (or files) containing both the HTML/javascript menu infrastructure as well as the Highcharts javascript code to create the charts. Data - JSON files as produced by CumulusMX - is assumed to be present in the directory  from where the page is called.


== Language ==
== Language ==
Line 37: Line 37:


== Output ==
== Output ==
If the file ''CutilsCharts.def'' with the charts definitions is present in the ''utils'' directory, then the output for the ChartsCompiler is (until version 5.2.0) the file ''cumuluscharts.txt''. As such it replaces the default ''cumuluscharts.txt'' which will always be available as a backup in case of errors in the definitions or processing.
=== The Defaults ===
If the file ''CutilsCharts.def'' with the charts definitions is present in the ''utils'' directory, then the output for the ChartsCompiler is (until version 5.3.5) the file ''cumuluscharts.txt''. As such it replaces the default ''cumuluscharts.txt'' which will always be available as a backup in case of errors in the definitions or processing.
 
So cumuluscharts.txt contains either:
#When an error occurs during parsing of the ''CutilsCharts.def'': the standard (old version) of the charts which contains a mix of RECENT and DAILY charts.
#When parsing of ''CutilsCharts.def'' is without error: the charts as defined in the ''CutilsCharts.def''.
 
=== When using the CDL OUTPUT spec ===
For every OUTPUT specification in the definition file an output is created containing all charts defined from that point, including the chart on which it was defined. ''cumulusutils.txt'' will always be created which means at  least the first chart will  be in there. ''cumulusutils.txt'' will be used to fill the Home button in the CumulusUtils website.
 
So:
#An output spec ''file1.txt'' for the first chart will create ''cumulusutilcharts.txt'' containing the first chart and a ''file1.txt'' also containing the first chart but also the subsequent charts.
#An output spec ''file2.txt'' for the third chart will create chart 1 and 2 in ''file1.txt'' and chart 3 in ''file2.txt''.
#An output spec ''file3.txt'' for the last and eighth chart will create chart 3,4,5,6,7 in ''file2.txt'' and chart 8 in ''file3.txt''
 
The Compiler outputs can be loaded standalone to present the charts if the data are available in the same directory. The txt files can be loaded in any way needed (PHP or javascript) or renamed HTML and loaded directly. Be aware that the inifile parameters ''GeneratejQueryInclude'' and ''DoLibraryIncludes'' have impact here depending on how you organise your website or wish to show the charts.


== Inifile parameters ==
== Inifile parameters ==

Navigation menu