LegendBackgroundOptions

New in version 5.0

LegendBackgroundOptions ( cornerRadius ;​ padding )

Argument Type Range Default Note
cornerRadius num[] 0..1000 0 Absolute in px or in % of drawing diagonal
padding num[] 0..1000 2% Absolute in px or in % of drawing diagonal
Examples
Description

The first argument cornerRadius can have up to four corner radii (topLeft, topRight, bottomRight and bottomLeft). As the second argument padding, it is possible to define the padding for each side of an element (top, right, bottom and left). Refer to the mnemonic “TRouBLe" as an easy way to remember the order of paddings. The cornerRadius and padding can be entered absolute in pixels or relative as percentage of the diagonal of the drawing area.
Please note, background option functions are only enabled in combination with the corresponding background function.

LEGEND_BACKGROUND_OPTIONS_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

AxisLine(all;​0)

11

AxisMajorTicks(all;​0)

12

/* Set up legend. */

13

LegendTexts("Employee 1";​"Employee 2";​"Employee 3")

14

LegendBackground(white;​;​0.25;​lightGray;​;​1 1 3)

15

LegendBackgroundOptions(6;​8)

16

/* Set up grid. */

17

MajorGridLineWidths(x;​y;​0.25)

18

MajorGridLineWidths(y;​x;​0)

19

CloseDrawing()

LEGEND_BACKGROUND_OPTIONS_01
Scroll to Top