ChartData
ChartData ( dataSeries1 ; dataSeries2 ; . . . ; dataSeries10000 )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
dataSeries1 | num[] | -inf..+inf | (required) | |
dataSeries2 | num[] | -inf..+inf | (required) | |
... | num[] | -inf..+inf | (required) | |
dataSeries10000 | num[] | -inf..+inf | (required) |
Examples
Description
The ChartData() function makes it possible to transfer the chart values to xmCHART. Each data series consists of a series of numbers which are separated by spaces, tabs or line feeds. Decimal numbers can be represented by a decimal point or decimal comma.
Instead of numerical data, dates and times can also be passed to ChartData(). For more details, refer to Date & Time.
Multiple data series are separated by a semicolon ";". The meaning of the individual data series in ChartData() is dependent on the chart to be drawn. For the 1-dimensional chart functions, a data series in ChartData() corresponds exactly to a chart series. For the 2-dimensional chart functions, the first data series in ChartData() contains the x values, the second data series the y values of the 1st chart series, the 3rd and 4th data series the x and y values of the 2nd chart series, etc.
OpenDrawing(200;120)
ChartData(23 19 10 15 13 6 2; /* 1st series. */
18 12 19 24 15 15 6) /* 2nd series. */
SymbolStyle(all;bullet;4)
OpenDrawing(200;120)
ChartData(23 19 10 15 13 6 2; /* x-values. */
18 12 19 24 15 15 6) /* y-values. */
SymbolStyle(all;bullet;4)
To pass incomplete series of values replace the missing values with NULL. For example:
ChartData(12 98.3 null 8 Null NULL 7.23 -0.67)
Data can be entered in transposed form, i.e. the rows and columns are switched by using ChartDataOptions(scanDirection). For examples, refer to function ChartDataOptions() .