ChartBackgroundOptions

New in version 5.0

ChartBackgroundOptions ( 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

Currently, the function ChartBackgroundOptions() is available only for circular bar charts, linear meters, linear gauges and radial gauges.
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.

CHART_BACKGROUND_OPTIONS_01
1

OpenDrawing(250;​150)

2

ChartData(0 6.71)

3

LinearMeter(horizontal;​

4

10%;​ /* Thickness relative to plot area height. */

5

0;​ /* Corner radius.  */

6

0;​ /* Scale line offset.  */

7

3;​ /* Major tick mark offset.  */

8

3;​ /* Minor tick mark offset.  */

9

0;​ /* Symbol offset.  */

10

0;​ /* Bar gap relative to bar thickness.  */

11

6;​ /* Bar shape. [0..16]  */

12

lightGray;​0;​ /* Meter fill color.  */

13

0) /* Meter border.  */

14

/* Use style functions to control the appearance of bar(s) and symbol(s). */

15

FillStyle(1;​#D72729)

16

BorderStyle(1;​none)

17

/* Use scale and axis functions to control the appearance of the scale. */

18

Scaling(all;​linear;​0;​10;​10;​5)

19

AxisLine(all;​0)

20

AxisMajorTicks(all;​10;​0.25;​#666)

21

AxisMinorTicks(all;​5;​0.25;​#666)

22

AxisMajorTickLabelTexts(all;​"|u|";​"")

23

AxisMajorTickLabelStyle(all;​;​;​;​#666)

24

ChartBackground(xy;​#f3f6f2;​0;​0;​;​;​2 2 2;​lightGray)

25

ChartBackgroundOptions(10;​20)

26

CloseDrawing()

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

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

×