LineChart2D

LineChart2D ( appearanceConst )

Argument Type Range Default Note
appearanceConst int 0..127 default
Description

The LineChart2D() function makes it possible to draw two-dimensional line charts. The 1st data series in the ChartData() function provides the x-values, the 2nd data series the y-values for the first line series, the 3rd and 4th data series in ChartData() the x and y-values for the second line series, etc.

LINE_CHART_2D_01
1

OpenDrawing(250;​150)

2

ChartData(1 2 3 5 6 8;​ /* x-values. */

3

7 16 12 9 7 5) /* y-values. */

4

LineChart2D(symbol+shadow)

5

/* Set up styles. */

6

LineStyle(1;​poly;​1;​#4682b4)

7

SymbolStyle(1;​circle;​5;​1;​#4682b4;​;​white)

8

ShadowStyle(all;​2 2 3)

9

/* Set up axes. */

10

Scaling(y;​linear;​0)

11

AxisLine(all;​0)

12

AxisMajorTicks(all;​0)

13

AxisMajorTickLabelOptions(x;​;​;​3)

14

AxisMajorTickLabelOptions(y;​;​-3)

15

/* Set up grid. */

16

MajorGridLineWidths(x;​y;​0.25)

17

MajorGridLineWidths(y;​x;​0)

18

CloseDrawing()

LINE_CHART_2D_01
LINE_CHART_2D_02
1

OpenDrawing(250;​150)

2

ChartData( 7 11 18 20 24;​ /* 1st series: x-values. */

3

2 18 16 9 13;​ /* 1st series: y-values. */

4

23 10 15 12 6;​ /* 2nd series: x-values. */

5

3 10 15 5 4) /* 2nd series: y-values. */

6

LineChart2D()

7

/* Set up styles. */

8

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

9

LineStyle(2;​poly;​1.5;​#fdb910)

10

/* Set up axes. */

11

AxisLine(all;​0)

12

AxisMajorTicks(all;​0)

13

AxisMajorTickLabelOptions(x;​;​;​3)

14

AxisMajorTickLabelOptions(y;​;​-3)

15

/* Set up grid. */

16

MajorGridLineWidths(all;​all;​0.25)

17

GridFrame(xy;​0.5;​#888)

18

CloseDrawing()

LINE_CHART_2D_02

As for one-dimensional line charts, symbols (appearanceConstants = symbol), shadow (appearanceConstants = shadow) and labels (appearanceConstants = label) can also be added to the lines by using the argument appearanceConstants. The options can be combined arbitrarily by using a plus sign "+". Rotating (appearanceConstants = horizontal) is not supported for two-dimensional charts as this is simply possible by switching the data series in ChartData() .

LINE_CHART_2D_03
1

OpenDrawing(250;​150)

2

ChartData(25 15 10 15 15 6 0;​ /* x-values. */

3

18 10 19 24 17 14 8;​ /* y-values. */

4

0 25;​ 27 27;​ /* Upper border line. */

5

0 25;​ 5 5) /* Lower border line. */

6

LineChart2D(symbol)

7

/* Set up styles. */

8

LineStyle(1;​smooth;​1;​darkRed)

9

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

10

LineStyle(3;​poly;​2 2 2;​#3879aa)

11

SymbolStyle(1;​circle;​5;​1;​darkRed;​;​white)

12

SymbolStyle(2;​none)

13

SymbolStyle(3;​none)

14

/* Set up axes. */

15

AxisLine(all;​0)

16

AxisMajorTicks(all;​0)

17

AxisMajorTickLabelOptions(x;​;​;​3)

18

AxisMajorTickLabelOptions(y;​;​-3)

19

/* Set up grid. */

20

MajorGridLineWidths(all;​all;​0.25)

21

GridFrame(xy;​0.5;​#888)

22

CloseDrawing()

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

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

×