LegendTitle

New in version 4.0

LegendTitle ( title ;​ font ;​ size ;​ style ;​ color ;​ hAlignment ;​ vGap ;​ orientation ;​ maxWidth ;​ maxHeight ;​ ellipsisPosition ;​ shadowEffect ;​ shadowColor )

Argument Type Range Default Note
title str 0..1000 "" Max. 1000 chars.
font str 0..255 ApplFont
size num 0..1000 9 Dimension:[pt]
style int 0..7 plain
color rgba 0..255 black
hAlignment int 1..3 center
vGap num -10000..10000 5 Gap between title and items
orientation num -360..+360 0 Dimension:[deg]
maxWidth num -1..10000 -1 Dimension:[pt]
maxHeight num -1..10000 -1 Dimension:[pt]
ellipsisPosition int 0..4 3
shadowEffect num[] -1000..1000 0
shadowColor rgba 0..255 #888a
Examples

LegendTitle("Companies")

LegendTitle("Countries\nwithout postcodes";​Verdana;​14;​bold)

Description

By using the function LegendTitle() an optional legend title can be defined. The attributes orientation, maxWidth, maxHeight and ellipsisPosition are discussed in the LabelStyle() function.

LEGEND_TITLE_01
1

OpenDrawing(250;​150)

2

ChartData(3;​ 4;​ 1)

3

BarChart(horizontal)

4

/* Set up styles. */

5

FillStyle(3;​160 160 160 220)

6

FillStyle(2;​120 120 120 220)

7

FillStyle(1;​200 50 50 220)

8

BorderStyle(all;​none)

9

/* Set up axes. */

10

ScalingOptions(y;​on)

11

AxisLine(all;​0)

12

AxisMajorTicks(all;​0)

13

AxisMajorTickLabelTexts(y;​"")

14

/* Set up legend. */

15

LegendTexts("Group A ";​"Group B ";​"Group C ")

16

LegendTitle("Employees";​Verdana;​10;​bold;​;​;​10)

17

/* Arrange reversed, column by column. */

18

LegendOptions(centerLeft;​;​;​-8;​

19

-1 1 1;​

20

;​;​;​;​12)

21

/* Set up grid. */

22

MajorGridLineWidths(x;​y;​0.25)

23

MajorGridLineWidths(y;​x;​0)

24

CloseDrawing()

LEGEND_TITLE_01
LEGEND_TITLE_02
1

OpenDrawing(250;​150)

2

ChartData(3 3.5 3;​ 1 1.5 1)

3

LineChart(symbol)

4

/* Set up styles. */

5

LineStyle(1;​step;​1.5;​121 190 51)

6

LineStyle(2;​step;​1.5;​ 48 89 195)

7

SymbolStyle(1;​circle;​6;​1;​121 190 51;​;​white)

8

SymbolStyle(2;​circle;​6;​1;​ 48 89 195;​;​white)

9

/* Set up axes. */

10

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

11

AxisLine(all;​0)

12

AxisMajorTicks(all;​0)

13

AxisOptions(y;​;​2)

14

/* Set up legend. */

15

LegendTexts("DS-1";​"DS-2")

16

LegendTitle("Distributions";​Verdana;​10;​bold;​;​;​8)

17

LegendOptions(bottomCenter;​;​;​;​1;​line+symbol;​20;​;​;​;​20)

18

/* Set up grid. */

19

MajorGridLineWidths(x;​y;​0.25)

20

MajorGridLineWidths(y;​x;​0)

21

CloseDrawing()

LEGEND_TITLE_02
LEGEND_TITLE_03
1

OpenDrawing(250;​150)

2

ChartData(100 50 15)

3

PieChart()

4

/* Set up styles. */

5

FillStyle(1;​#00a79d;​shaded)

6

FillStyle(2;​#f81a53;​shaded)

7

FillStyle(3;​#063e9e;​shaded)

8

BorderStyle(all;​none)

9

/* Set up legend. */

10

LegendTitle("Countries";​Verdana;​10;​bold;​;​;​10)

11

LegendTexts("Switzerland";​"Norway";​"Luxembourg")

12

LegendOptions(centerRight;​;​

13

0;​0;​ /* hOffset and vOffset. */

14

-1 1;​ /* Number of rows and columns. */

15

automatic;​ /* Marker type. */

16

14;​14;​ /* Symbol size. */

17

5;​ /* Gap between symbol and text. */

18

10;​40;​ /* Gap between rows and columns. */

19

bottomCenter;​ /* Location of legend text. */

20

2) /* Marker shape. */

21

CloseDrawing()

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

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

×