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
BarChartOptions(;;on)
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 | |
3 | ChartData( 0 24 38 62 76 100; |
4 | 10 58 70 94; |
5 | 20 100) |
6 | |
7 | GanttChartOptions(off) /* Don't optimize label text color. */ |
8 | /* Set up styles. */ |
9 | |
10 | FillStyle(2;whitesmoke;0;steelblue;shaded) |
11 | FillStyle(3;yellowGreen) |
12 | |
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 | |
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 | |
25 | |
26 | ChartData( 0 24 38 62 76 100; |
27 | 10 58 70 94; |
28 | 20 100) |
29 | |
30 | GanttChartOptions(on) /* Optimize label text color. */ |
31 | /* Set up styles. */ |
32 | |
33 | FillStyle(2;whitesmoke;0;steelblue;shaded) |
34 | FillStyle(3;yellowGreen) |
35 | |
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 | |
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 | |
48 |
See also functions BarChartOptions() and PieChartLabelOptions() .