LegendTexts

LegendTexts ( text1 ;​ text2 ;​ . . . ;​ text10000 )

Argument Type Range Default Note
text1 str 0..1000 (see desc.) Max. 1000 chars.
text2 str 0..1000 (see desc.) Max. 1000 chars.
... str 0..1000 (see desc.) Max. 1000 chars.
text10000 str 0..1000 (see desc.) Max. 1000 chars.
Examples

LegendTexts("Turnover\nDepartment A";​"Turnover\nDepartment B")

Description

By using the LegendTexts() function each data series can be assigned a name. Texts consisting of several lines are possible by inserting a line feed "\n". If no or too few names are provided, the default text "Series" plus a serial number will be used for the missing names.

Please note that a legend is not created automatically by default, but rather by calling one of the four functions:
LegendTexts(), LegendStyle() , LegendBackground() , LegendOptions() .

LEGEND_TEXTS_01
1

OpenDrawing(250;​150)

2

ChartData(1 4;​ 2 3;​ 3 2)

3

BarChart()

4

/* Set up styles. */

5

FillStyle(1;​160 160 160 220)

6

FillStyle(2;​120 120 120 220)

7

FillStyle(3;​200 50 50 220)

8

BorderStyle(all;​none)

9

/* Set up axes. */

10

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

11

AxisLine(all;​0)

12

AxisMajorTicks(all;​0)

13

/* Set up legend. */

14

LegendTexts()

15

/* Set up grid. */

16

MajorGridLineWidths(x;​y;​0.25)

17

MajorGridLineWidths(y;​x;​0)

18

CloseDrawing()

LEGEND_TEXTS_01
LEGEND_TEXTS_02
1

OpenDrawing(250;​150)

2

ChartData(1 4;​ 2 3;​ 3 2)

3

BarChart()

4

/* Set up styles. */

5

FillStyle(1;​160 160 160 220)

6

FillStyle(2;​120 120 120 220)

7

FillStyle(3;​200 50 50 220)

8

BorderStyle(all;​none)

9

/* Set up axes. */

10

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

11

AxisLine(all;​0)

12

AxisMajorTicks(all;​0)

13

/* Set up legend. */

14

LegendTexts("Department\n12-A";​"Department\n12-B")

15

/* Set up grid. */

16

MajorGridLineWidths(x;​y;​0.25)

17

MajorGridLineWidths(y;​x;​0)

18

CloseDrawing()

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

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

×