LabelBackground

LabelBackground ( seriesIndex ;​ fillColor ;​ fillColorVariant ;​ borderStroke ;​ borderColor ;​ borderColorVariant ;​ shadowEffect ;​ shadowColor )

Argument Type Range Default Note
seriesIndex int -1..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
Description

By using the LabelBackground() function, a background can be added to labels. In doing so, it is possible to vary the fill, border and shadow.

LABEL_BACKGROUND_01
1

OpenDrawing(250;​150)

2

ChartData(4.8 3.5 2.5 1.2 0.6 0.2)

3

PieChart(oval+label+shadow)

4

PieChartLabelOptions(;​8)

5

/* Set up styles. */

6

FillColorScheme(blue;​shaded)

7

FillStyle(4;​#c7d52e)

8

BorderStyle(all;​;​1.5;​white)

9

ShadowStyle(all;​2 2 3)

10

LabelBackground(1;​white;​;​0;​;​;​0 0 3)

11

CloseDrawing()

LABEL_BACKGROUND_01
LABEL_BACKGROUND_02
1

OpenDrawing(250;​150)

2

ChartData(1.5 2.7 1.3;​

3

3.3 1.7 2.3)

4

BarChart(label+shadow)

5

/* Set up styles. */

6

FillStyle(1;​#005ca9)

7

FillStyle(2;​#cbdb29)

8

BorderStyle(all;​none)

9

ShadowStyle(all;​2 2 3)

10

LabelBackground(1;​#c6e1f8;​;​0)

11

LabelBackground(2;​#f0f4d5;​;​0)

12

/* Set up axes. */

13

AxisLine(all;​0)

14

AxisMajorTicks(all;​0)

15

AxisMajorTickLabelTexts(x;​"A";​"B";​"C")

16

/* Set up grid. */

17

MajorGridLineWidths(x;​y;​0.25)

18

MajorGridLineWidths(y;​x;​0)

19

CloseDrawing()

LABEL_BACKGROUND_02
Scroll to Top