GanttChartOptions

New in version 5.0

GanttChartOptions ( optimizeLabelTextColor )

Argument Type Range Default Note
optimizeLabelTextColor int 0..1 off xmCHART 5.0.5 or higher required
Examples
Description

By activating the argument optimizeLabelTextColor =​ on the label text color is automatically adjusted to ensure good readability. Labels located outside of the bars are not affected by optimizeLabelTextColor. Please note that the GanttChartOptions() function should be listed after the GanttChart() function. This rule generally applies: chart options should always be listed after the actual chart function.

GANTT_CHART_OPTIONS_01
1

OpenDrawing(500;​150)

2

OpenChart(25;​20;​180;​100;​on)

3

ChartData( 0 24 38 62 76 100;​

4

10 58 70 94;​

5

20 100)

6

GanttChart(label+shadow)

7

GanttChartOptions(off) /* Don't optimize label text color. */

8

/* Set up styles. */

9

FillStyle(1;​steelBlue;​0;​darkGreen;​0;​darkRed)

10

FillStyle(2;​whitesmoke;​0;​steelblue;​shaded)

11

FillStyle(3;​yellowGreen)

12

BorderStyle(all;​none)

13

LabelTexts(2;​"Part 1 (|u|)";​"|u|")

14

LabelTexts(3;​"|u| days")

15

ShadowStyle(all;​2 2 3)

16

/* Set up axes. */

17

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

18

AxisLine(all;​0)

19

AxisMajorTicks(all;​0)

20

AxisMajorTickLabelTexts(y;​"A";​"B";​"C")

21

/* Set up grid. */

22

MajorGridLineWidths(x;​y;​0)

23

MajorGridLineWidths(y;​x;​0.25)

24

CloseChart()

25

OpenChart(280;​20;​200;​100;​on)

26

ChartData( 0 24 38 62 76 100;​

27

10 58 70 94;​

28

20 100)

29

GanttChart(label+shadow)

30

GanttChartOptions(on) /* Optimize label text color. */

31

/* Set up styles. */

32

FillStyle(1;​steelBlue;​0;​darkGreen;​0;​darkRed)

33

FillStyle(2;​whitesmoke;​0;​steelblue;​shaded)

34

FillStyle(3;​yellowGreen)

35

BorderStyle(all;​none)

36

LabelTexts(2;​"Part 1 (|u|)";​"|u|")

37

LabelTexts(3;​"|u| days")

38

ShadowStyle(all;​2 2 3)

39

/* Set up axes. */

40

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

41

AxisLine(all;​0)

42

AxisMajorTicks(all;​0)

43

AxisMajorTickLabelTexts(y;​"A";​"B";​"C")

44

/* Set up grid. */

45

MajorGridLineWidths(x;​y;​0)

46

MajorGridLineWidths(y;​x;​0.25)

47

CloseChart()

48

CloseDrawing()

GANTT_CHART_OPTIONS_01

See also functions BarChartOptions() and PieChartLabelOptions() .

Scroll to Top