TitleBackgroundOptions

New in version 5.0

TitleBackgroundOptions ( 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.

TITLE_BACKGROUND_OPTIONS_01
1

OpenDrawing(250;​200)

2

ChartData(26 13 6 3 1)

3

BarChart()

4

/* Set up styles. */

5

FillStyle(1;​#4682b4)

6

BorderStyle(all;​none)

7

/* Set up axes. */

8

AxisLine(all;​0)

9

AxisMajorTicks(all;​0)

10

/* Set up title. */

11

TitleText("A diagram with a very long title.")

12

TitleStyle(Verdana;​11;​plain;​#555;​;​;​150) /* Limit title width to 150 pixels. */

13

TitleBackground(whiteSmoke;​;​0.25;​none;​;​1 1 3)

14

TitleBackgroundOptions(4;​8)

15

/* Set up grid. */

16

MajorGridLineWidths(x;​y;​0.25)

17

MajorGridLineWidths(y;​x;​0)

18

CloseDrawing()

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

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

×