ChartDataOptions

Modified in version 4.0

ChartDataOptions ( scanDirection )

Argument Type Range Default Note
scanDirection int 1..3 xxyy
Examples

ChartDataOptions(xyxy)

ChartData(23 45;​34 67;​11 76;​12 56;​44 21)

Description

As the default, the values of a chart series are entered successively (scanDirection = xxyy). Example:

ChartData(2 3 -10 5;​ /* 1st series. */

3 9 12 -3) /* 2nd series. */

However, from time to time, it can be advantageous to enter the data in transposed form, i.e. the rows and columns are switched (scanDirection = xyxy and scanDirection = xyxy2). Example:

ChartData(2 3;​

3 9;​

-10 12;​

5 -3)

For example, several data series from a sequence of FileMaker Pro records can be transferred in transposed form to ChartData() via one single loop. Otherwise, if not in transposed form, a separate loop for each data series is necessary. Please note that the ChartDataOptions() function should be entered before the ChartData() function.

CHART_DATA_OPTIONS_01
1

OpenDrawing(250;​150)

2

ChartDataOptions(xyxy) /* Before ChartData() */

3

ChartData(23 18;​

4

19 12;​

5

10 19;​

6

15 24;​

7

13 17;​

8

5 15;​

9

2 6)

10

LineChart(symbol;​on)

11

/* Set up styles. */

12

LineStyle(1;​poly;​1;​#3879aa)

13

LineStyle(2;​poly;​1;​#c002a0)

14

SymbolStyle(1;​circle;​4.5;​1;​#3879aa;​;​white)

15

SymbolStyle(2;​circle;​4.5;​1;​#c002a0;​;​white)

16

/* Set up axes. */

17

AxisLine(all;​0)

18

AxisMajorTicks(x;​5;​0.25;​#333;​;​out)

19

AxisMajorTicks(y;​0)

20

/* Set up grid. */

21

MajorGridLineWidths(y;​x;​0) /* Hide vertical grid lines. */

22

MajorGridLineWidths(x;​y;​0.25)

23

CloseDrawing()

CHART_DATA_OPTIONS_01

The following two scripts produce the same result:

(1) Not transposed: (default)

CHART_DATA_OPTIONS_02
1

OpenDrawing(250;​150)

2

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

3

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

4

LineChart2D(symbol)

5

/* Set up styles. */

6

LineStyle(1;​poly;​1;​#3879aa)

7

SymbolStyle(1;​circle;​4.5;​1;​#3879aa;​;​white)

8

/* Set up axes. */

9

AxisLine(all;​0)

10

AxisMajorTicks(all;​0)

11

/* Set up grid. */

12

MajorGridLineWidths(all;​all;​0.25)

13

CloseDrawing()

CHART_DATA_OPTIONS_02

(2) Transposed:

CHART_DATA_OPTIONS_03
1

OpenDrawing(250;​150)

2

ChartDataOptions(xyxy) /* Before ChartData() */

3

ChartData(23 18;​

4

19 12;​

5

10 19;​

6

15 24;​

7

13 12;​

8

6 15;​

9

2 6)

10

LineChart2D(symbol)

11

/* Set up styles. */

12

LineStyle(1;​poly;​1;​#3879aa)

13

SymbolStyle(1;​circle;​4.5;​1;​#3879aa;​;​white)

14

/* Set up axes. */

15

AxisLine(all;​0)

16

AxisMajorTicks(all;​0)

17

/* Set up grid. */

18

MajorGridLineWidths(all;​all;​0.25)

19

CloseDrawing()

CHART_DATA_OPTIONS_03


Optional, data series can be transferred in transposed form to ChartData() by using scanDirection = xyxy2. For example:

CHART_DATA_OPTIONS_04
1

OpenDrawing(250;​150)

2

ChartDataOptions(xyxy2) /* Before ChartData() */

3

ChartData(23 18

4

19 12

5

10 19

6

15 24

7

13 12

8

6 15

9

2 6;​

10

10 10

11

20 3)

12

LineChart2D(symbol)

13

/* Set up styles. */

14

LineStyle(1;​poly;​1;​#3879aa)

15

LineStyle(2;​poly;​1;​#c002a0)

16

SymbolStyle(1;​circle;​4.5;​1;​#3879aa;​;​white)

17

SymbolStyle(2;​circle;​4.5;​1;​#c002a0;​;​white)

18

/* Set up axes. */

19

AxisLine(all;​0)

20

AxisMajorTicks(all;​0)

21

/* Set up grid. */

22

MajorGridLineWidths(all;​all;​0.25)

23

CloseDrawing()

CHART_DATA_OPTIONS_04
Scroll to Top
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×