AxisMajorTickLabelBackground

Modified in version 4.0

AxisMajorTickLabelBackground ( axisIndex ;​ fillColor ;​ fillColorVariant ;​ borderStroke ;​ borderColor ;​ borderColorVariant ;​ shadowEffect ;​ shadowColor )

Argument Type Range Default Note
axisIndex int 0..10000 all
fillColor rgba 0..255 white
fillColorVariant int -1..128 solid
borderStroke num[] 0..1000 1 Dimension:[pt]
borderColor rgba 0..255 black
borderColorVariant int -1..128 solid
shadowEffect num[] -1000..1000 0
shadowColor rgba 0..255 #888a
Examples

AxisMajorTickLabelBackground(all;​;​;​0) /* White background, no border. */

AxisMajorTickLabelBackground(y;​yellow) /* Yellow background, black border. */

Description

A background can be added to the tick mark labels by using the AxisMajorTickLabelBackground() function. It is possible to vary the fill, border and shadow.

AXIS_MAJOR_TICK_LABEL_BACKGROUND_01
1

OpenDrawing(250;​150)

2

ChartData(40 65 55 85 48 61)

3

BarChart(label)

4

/* Set up styles. */

5

FillStyle(1;​#fdb910)

6

BorderStyle(1;​none)

7

LabelOptions(1;​out) /* Place labels outside of bars. */

8

/* Set up axes. */

9

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

10

AxisLine(x;​0) /* Hide x-axis line. */

11

AxisMajorTicks(x;​0) /* Hide x-axis tick marks. */

12

AxisMajorTickLabelTexts(x;​"Q1\n17";​"Q2\n17";​"Q3\n17";​"Q4\n17";​"Q1\n18";​"Q2\n18")

13

AxisMajorTickLabelStyle(x;​Verdana;​9;​bold;​white)

14

AxisMajorTickLabelBackground(x;​#3879aa;​;​0)

15

/* Set up grid. */

16

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

17

CloseDrawing()

AXIS_MAJOR_TICK_LABEL_BACKGROUND_01
AXIS_MAJOR_TICK_LABEL_BACKGROUND_02
1

OpenDrawing(250;​150)

2

ChartData( 4 13 9 18;​

3

12 17 14 11;​

4

9 10 11 8)

5

BarChart()

6

/* Set up styles. */

7

FillStyle(1;​#005ca9;​shaded)

8

FillStyle(2;​#a2e4f9;​shaded)

9

FillStyle(3;​#cbdb29;​shaded)

10

BorderStyle(all;​none)

11

/* Set up axes. */

12

Scaling(y;​linear;​0;​20;​4)

13

AxisLine(all;​0) /* Hide axis lines. */

14

AxisMajorTicks(all;​0) /* Hide tick marks. */

15

AxisMajorTickLabelTexts(x;​"2015";​"2016";​"2017";​"2018")

16

AxisMajorTickLabelTexts(y;​"";​"";​"";​"|u|")

17

AxisMajorTickLabelStyle(x;​Verdana;​9;​plain;​#333)

18

AxisMajorTickLabelBackground(x;​white;​;​1;​white;​;​2 2 3)

19

AxisMajorTickLabelBackground(y;​#fee;​;​1;​#fee)

20

AxisMajorTickLabelOptions(x;​;​;​5)

21

AxisMajorTickLabelOptions(y;​;​2)

22

/* Set up grid. */

23

GridLocation(xy;​front)

24

MajorGridLineColors(x;​y;​none;​;​;​red;​;​)

25

MajorGridLineWidths(x;​y;​0.25;​0.25;​0.25;​0.5)

26

MajorGridLineWidths(y;​x;​0)

27

CloseDrawing()

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

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

×