AxisLabelOptions

AxisLabelOptions ( axisIndex ;​ location ;​ hOffset ;​ vOffset )

Argument Type Range Default Note
axisIndex int 0..10000 all
location int 0..9 (autom.)
hOffset num -10000..10000 0 Dimension:[pt]
vOffset num -10000..10000 0 Dimension:[pt]
Description

By using the AxisLabelOptions() function, the position of the axis label can be controlled. The argument location makes it possible to choose from among nine predefined positions. As the default, the x-axis is labeled in the center below the axis line (location = bottomCenter), the y-axis is labeled in the center left of the axis line (location = centerLeft). On polar and radar charts the axis labels are always located outside the chart; the argument location is ignored.

AXIS_LABEL_OPTIONS_01
1

OpenDrawing(250;​150)

2

ChartData(23 19 16 15 13 10 4)

3

LineChart(symbol;​on)

4

/* Set up styles. */

5

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

6

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

7

/* Set up axes. */

8

ScalingOptions(y;​on) /* y-scaling top to bottom. */

9

AxisOptions(x;​;​1) /* Move x-axis to top. */

10

AxisOptions(y;​;​1) /* Move y-axis to the right. */

11

AxisLine(all;​0)

12

AxisMajorTicks(all;​0)

13

AxisLabelText(x;​"Intervals")

14

AxisLabelText(y;​"Diff.\n[ft]")

15

AxisLabelBackground(all;​white;​;​3;​white;​;​2 2 3)

16

AxisLabelOptions(x;​topCenter;​;​-5) /* Move 5 pixels up. */

17

AxisLabelOptions(y;​bottomRight;​5) /* Move 5 pixels right. */

18

/* Set up grid. */

19

MajorGridLineWidths(x;​y;​0.25)

20

MajorGridLineWidths(y;​x;​0)

21

CloseDrawing()

AXIS_LABEL_OPTIONS_01
AXIS_LABEL_OPTIONS_02
1

OpenDrawing(250;​150)

2

ChartData(16 18 24 17 13 8)

3

BarChart(label;​0)

4

/* Set up styles. */

5

FillStyle(1;​#4682b420)

6

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

7

/* Set up axes. */

8

AxisOptions(x;​front)

9

AxisOptions(y;​none) /* Hide y-axis. */

10

AxisLine(x;​0)

11

AxisMajorTicks(x;​0)

12

AxisMajorTickLabelTexts(x;​"") /* Hide x-scaling labels. */

13

AxisLabelText(x;​"Frequency distribution")

14

AxisLabelBackground(x;​white;​;​3;​white;​;​2 2 3)

15

AxisLabelOptions(x;​topCenter;​;​-5) /* Move 5 pixels up. */

16

/* Set up grid. */

17

GridLocation(all;​none) /* Hide grid. */

18

CloseDrawing()

AXIS_LABEL_OPTIONS_02

The arguments hOffset and vOffset can be used to finely adjust the position of the label. Positive offset values move the label down to the right, negative values up to the left.

AXIS_LABEL_OPTIONS_03
1

OpenDrawing(250;​150)

2

ChartData(16 18 24 17 13 8)

3

BarChart(label;​0)

4

/* Set up styles. */

5

FillStyle(1;​#4682b420)

6

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

7

/* Set up axes. */

8

AxisOptions(x;​front)

9

AxisLine(x;​0)

10

AxisLine(y;​0.5;​black)

11

AxisMajorTicks(x;​0)

12

AxisMajorTicks(y;​6;​0.5;​black;​;​out)

13

AxisMajorTickLabelTexts(x;​"") /* Hide x-scaling labels. */

14

AxisLabelText(x;​"Frequency distribution")

15

AxisLabelText(y;​"Frequency")

16

AxisLabelStyle(x;​Verdana;​12;​plain;​#333)

17

AxisLabelStyle(y;​Verdana;​12;​plain;​#333;​;​-90)

18

AxisLabelOptions(x;​;​;​5) /* Move 5 pixels down. */

19

AxisLabelOptions(y;​;​-5) /* Move 5 pixels left. */

20

/* Set up grid. */

21

GridLocation(all;​none) /* Hide grid. */

22

CloseDrawing()

AXIS_LABEL_OPTIONS_03
Scroll to Top