ChartDataWrite

Deprecated

ChartDataWrite ( fileName ;​ fileFlag ;​ creatorType ;​ doTranspose ;​ seriesSeparator ;​ elementSeparator ;​ formatSpecifier1 ;​ formatSpecifier2 ;​ . . . ;​ formatSpecifier10000 )

Argument Type Range Default Note
fileName str 1..1000 (required) Max. 1000 chars.
fileFlag int 1..2 replace
creatorType str 4..4 "????" Ignored
doTranspose int 0..1 off
seriesSeparator str 1..1 "\n"
elementSeparator str 1..1 "\t"
formatSpecifier1 str 0..1000 "|u|" Max. 1000 chars.
formatSpecifier2 str 0..1000 "|u|" Max. 1000 chars.
... str 0..1000 "|u|" Max. 1000 chars.
formatSpecifier10000 str 0..1000 "|u|" Max. 1000 chars.
Examples

ChartDataWrite("C:/Programs/Data/exportdata.txt")

ChartDataWrite("/Volumes/Macintosh HD/Data/Plots/data_01.txt")

ChartDataWrite("ChartData.txt";​;​;​;​";";​" ";​"|i0|";​"|f2|")

Description

By using the ChartDataWrite() function it is possible to save the chart values in a text file. The first three arguments, fileName, fileFlag and creatorType, are explained in function SaveAsPNGFile() . As the default, the data is written row by row, i.e. a row corresponds to a data series. If the 4th argument doTranspose = on is used, the data is written in columns, i.e. a column corresponds to a data series. Furthermore, user-defined separators can be specified by using the arguments seriesSeparator and elementSeparator. Unless otherwise defined, series are separated by a line feed "\n" and the individual values by a tab character "\t". As an option, individual format specifiers can be assigned to data series. The format specifiers are repeated periodically if there are fewer format specifiers than data series. If no format specifier is defined, the default format specifier "|u|" is used. All format specifiers incl. numerous examples can be found in Numbers. All numbers are exported without a thousands separator; furthermore, all decimal numbers always with a decimal point "." and not with a decimal comma ",".
The ChartDataWrite() function can be entered either before or after the ChartData() function, but always within the OpenDrawing() and CloseDrawing() functions. ChartDataWrite() can also be called repeatedly.


OpenDrawing(200;​120)

ChartDataWrite("Data.txt";​replace;​;​on;​;​;​"|f1|";​"|f2|")

ChartData(23 19 10 15 13 6 2;​ /* x-values. */

18 12 19 24 15 15 6) /* y-values. */

LineChart2D(symbol)

SymbolStyle(1;​bullet;​4)

CloseDrawing()


OpenDrawing(200;​120)

OpenChart(5;​5;​120;​115;​off)

ChartData(3 2 1 5 3)

ChartDataWrite("Data_1.txt";​replace)

BarChart()

CloseChart()

OpenChart(120;​0;​75;​75;​off)

ChartData(13 9 13)

ChartDataWrite("Data_2.txt";​replace)

PieChart(label)

CloseChart()

OpenChart(120;​50;​75;​75;​off)

ChartData(1.5 2 1.5)

ChartDataWrite("Data_3.txt";​replace)

PieChart(label)

CloseChart()

CloseDrawing()

Scroll to Top