Data Formats
|
The following is a brief summary of the data formats supported by Emprise JavaScript Charts. For additional information please see the individual class help files and example code available at http://www.ejschart.com/help/
XML
The EJSC.XMLDataHandler class will load an XML file containing chart data using AJAX. The following XML formats are supported:
Full:
<graph> <plot> <point x="" y="" /> </plot> </graph>
<G> <L> <P x="" y="" /> </L> </G>
<G> <L values="X|Y,X|Y,X|Y" /> </G>
Array
The EJSC.ArrayDataHandler class will load chart data from a JavaScript array. The basic format of the array is as follows:
[ [X Value, Y Value], [X Value, Y Value] ]
CSV (Comma Separated Values)
The EJSC.CSVFileDataHandler and EJSC.CSVStringDataHandler classes support a comma separated list of data points. EJSC.CSVFileDataHandler will load the data points list from a file on the server using AJAX. EJSC.CSVStringDataHandler takes a string in its constructor specifying the CSV text.
X|Y,X|Y,X|Y
JSON (JavaScript Object Notation)
The EJSC.JSONFileDataHandler and EJSC.JSONStringDataHandler classes support JSON formatted data points. EJSC.JSONFileDataHandler will load the data points list from a file on the server using AJAX. EJSC.JSONStringDataHandlertakes a string in its constructor specifying the JSON text.
{ {"x":"x value", "y":"y value"}, {"x":"x value", "y":"y value"} ]
|