BarStyle

New in version 4.0

BarStyle ( seriesIndex ;​ startCapData ;​ endCapData )

Argument Type Range Default Note
seriesIndex int 0..10000 all
startCapData int[] 0..7 0
endCapData int[] 0..7 0
Examples

BarStyle(1;​0;​0) /* Straight bar ends. (default)  */

BarStyle(1;​1;​1) /* Bar with rounded corners. Radius: 25% of bar width. */

BarStyle(1;​1 25;​1 25) /* Same as previous example.  */

BarStyle(1;​1 25 1;​1 25 1) /* Same as previous example.  */

BarStyle(1;​1 50;​1 50) /* Round bar ends. Radius: 50% of bar width.  */

BarStyle(1;​1 15 0;​1 15 0) /* Bar with rounded corners. Radius: 15 pixels.  */

BarStyle(1;​0;​4) /* Bar with peaked end.  */

BarStyle(1;​0;​5) /* Bar with skewed end.  */

BarStyle(1;​4;​7) /* Bar with a notched and a peaked end.  */

Description

The style function BarStyle() makes it possible to define different bar end shapes for bar and Gantt charts. Round and angled bar ends are not supported in combination with 3D bars. The arguments startCapData and endCapData can have up to four values, i.e. the cap type, an optional size value and an also optional flag (0 or 1) to indicate whether the size value is absolute in pixels or as percentage of the bar width (default). The bar caps 4 (peak) and 7 (notch) have an optional 4th argument alignment with a value between 0 and 1.

BAR_STYLE_01
1

OpenDrawing(250;​150)

2

ChartData(12 17 14 11 6 12;​

3

9 10 11 8 12 4)

4

BarChart(stacked)

5

/* Set up styles. */

6

FillStyle(1;​#3879aa)

7

FillStyle(2;​#fdb910)

8

BorderStyle(all;​none)

9

BarStyle(2;​0;​1 50) /* Round bar ends. Radius: 50% of bar width. */

10

/* Set up axes. */

11

AxisLine(all;​0)

12

AxisMajorTicks(all;​0)

13

/* Set up grid. */

14

MajorGridLineWidths(x;​y;​0.25)

15

MajorGridLineWidths(y;​x;​0)

16

CloseDrawing()

BAR_STYLE_01
BAR_STYLE_02
1

OpenDrawing(250;​150)

2

ChartData(18 14 10 8 6)

3

BarChart(label+horizontal+shadow;​60)

4

/* Set up styles. */

5

FillStyle(1;​darkRed)

6

BorderStyle(1;​none)

7

BarStyle(1;​0;​4 30 1 0.25) /* Bars with peaked end. */

8

LabelOptions(1;​out)

9

LabelStyle(1;​Verdana;​10;​bold;​darkRed)

10

ShadowStyle(1;​1 1 3)

11

/* Set up axes. */

12

Scaling(x;​linear;​0;​20;​4)

13

ScalingOptions(y;​on) /* y-scale top to bottom. */

14

AxisLine(all;​0)

15

AxisMajorTicks(all;​0)

16

/* Set up grid. */

17

MajorGridLineWidths(y;​x;​0.25)

18

MajorGridLineWidths(x;​y;​0)

19

CloseDrawing()

BAR_STYLE_02
BAR_STYLE_03
1

OpenDrawing(450;​200)

2

OpenView(0;​0;​200;​200)

3

OpenChart(25;​15;​170;​170;​on)

4

ChartData(0.1 0.9;​ 0.1 0.9;​ 0.1 0.9;​ 0.1 0.9)

5

GanttChart(shadow;​80)

6

FillStyle(all;​90 120 90;​shaded)

7

BorderStyle(all;​none)

8

BarStyle(1;​3 50;​2 50) /* Start cap: rounded left, End cap: rounded right */

9

BarStyle(2;​1 50;​1 50) /* Start cap: rounded, End cap: rounded  */

10

BarStyle(3;​4 30;​4 30) /* Start cap: peaked, End cap: peaked  */

11

BarStyle(4;​7 40;​4 40) /* Start cap: notched, End cap: peaked  */

12

ShadowStyle(all;​0 0 2)

13

ScalingOptions(y;​on)

14

AxisOptions(all;​none) /* hide axes */

15

MajorGridLineWidths(all;​all;​0.25)

16

CloseChart()

17

CloseView()

18

OpenView(250;​0;​200;​200)

19

OpenChart(5;​15;​170;​170;​on)

20

ChartData( 0.9;​ 0.9;​ 0.9;​ 0.9)

21

BarChart(shadow;​100;​60)

22

FillStyle(all;​86 111 145;​shaded)

23

BorderStyle(all;​0;​2.0;​150 150 145)

24

BarStyle(1;​0;​5 50) /* Start cap: straight, End cap: skewed right */

25

BarStyle(2;​0;​6 25) /* Start cap: straight, End cap: skewed left  */

26

BarStyle(3;​0;​1 30) /* Start cap: straight, End cap: rounded  */

27

BarStyle(4;​0;​3 50) /* Start cap: straight, End cap: rounded left */

28

ShadowStyle(all;​0 0 3)

29

AxisOptions(all;​none) /* Hide axes. */

30

MajorGridLineWidths(all;​all;​0.25)

31

CloseChart()

32

CloseView()

33

CloseDrawing()

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

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

×