BubbleChart
BubbleChart ( appearanceConst ; doShiftIntervals )
Argument | Type | Range | Default | Note |
---|---|---|---|---|
appearanceConst | int | 0..127 | default | |
doShiftIntervals | int | 0..1 | off |
Examples
Description
The BubbleChart() function serves to draw one-dimensional bubble charts. The 1st data series in the ChartData() function defines the positions, the 2nd data series the diameters of the 1st series, the 3rd and 4th data series in ChartData() the positions and diameters of the 2nd series, etc.
| BUBBLE_CHART_01 |
1 | OpenDrawing(250;150) |
2 | ChartData(7 3 9 18 10 5; /* y-values. */ |
3 | 3 6 9 12 6 4) /* Diameters. */ |
4 | |
5 | /* Set up styles. */ |
6 | FillStyle(1;#4682b420) |
7 | BorderStyle(1;;0.75;#4682b4) |
8 | /* Set up axes. */ |
9 | |
10 | AxisMajorTicks(all;0) |
11 | AxisMajorTickLabelOptions(y;;-5) |
12 | /* Set up grid. */ |
13 | MajorGridLineWidths(x;y;0.25) |
14 | MajorGridLineWidths(y;x;0) |
15 |
The 1st argument appearanceConstants makes it possible to rotate the chart 90 degrees (appearanceConstants = horizontal) and to add symbols (appearanceConstants = symbol), shadow (appearanceConstants = shadow) and labels (appearanceConstants = label) to the bubbles. All options can be combined by using a plus sign "+".
| BUBBLE_CHART_02 |
1 | OpenDrawing(250;150) |
2 | ChartData(7 3 9 18 10 5; /* y-values. */ |
3 | 3 6 9 12 6 4) /* Diameters. */ |
4 | |
5 | /* Set up styles. */ |
6 | FillStyle(1;#4682b415) |
7 | BorderStyle(1;;0.75;#4682b4) |
8 | ShadowStyle(all;2 2 3) |
9 | /* Set up axes. */ |
10 | ScalingOptions(y;on) /* y-scale top to bottom. */ |
11 | |
12 | AxisMajorTicks(all;0) |
13 | AxisMajorTickLabelOptions(x;;;6) |
14 | /* Set up grid. */ |
15 | MajorGridLineWidths(x;y;0) |
16 | MajorGridLineWidths(y;x;0.25) |
17 |
The fills, borders, symbols and shadows can be varied by using the style functions FillColorScheme() , FillStyle() , PictureStyle() , BorderColorScheme() , BorderStyle() , SymbolColorScheme() , SymbolStyle() and ShadowStyle() and the labels by using the five style functions LabelTexts() , LabelStyle() , LabelBackground() , LabelBackgroundOptions() and LabelOptions() .
| BUBBLE_CHART_03 |
1 | OpenDrawing(250;150) |
2 | ChartData( 7 3 9 18 10 5; /* x-values. */ |
3 | 11 6 9 12 6 4) /* Diameters. */ |
4 | |
5 | /* Set up styles. */ |
6 | FillStyle(1;2 0.8 0.8 0.1 187 191 251 190 0.7 34 56 148 190) |
7 | BorderStyle(1;none) |
8 | LabelStyle(1;Verdana;10;bold;white) |
9 | /* Set up axes. */ |
10 | ScalingOptions(y;on) /* y-scale top to bottom. */ |
11 | |
12 | AxisMajorTicks(all;0) |
13 | AxisMajorTickLabelOptions(x;;;6) |
14 | /* Set up grid. */ |
15 | MajorGridLineWidths(x;y;0) |
16 | MajorGridLineWidths(y;x;0.25) |
17 |
For one-dimensional bubble charts it is possible to move all bubbles half an interval width so that they do not lie on the interval borders but rather in the middle of the intervals. This can be done by activating the 2nd argument doShiftIntervals = on.
| BUBBLE_CHART_04 |
1 | OpenDrawing(250;150) |
2 | ChartData(7 3 9 18 10 5; /* y-values. */ |
3 | 3 6 9 12 6 4) /* Diameters. */ |
4 | |
5 | /* Set up styles. */ |
6 | FillStyle(1;#3879aacc) |
7 | BorderStyle(1;none) |
8 | ShadowStyle(all;2 2 3) |
9 | LabelStyle(1;Verdana;9;bold;white) |
10 | LabelOptions(1;;;-1) |
11 | /* Set up axes. */ |
12 | |
13 | AxisMajorTicks(all;0) |
14 | /* Set up grid. */ |
15 | MajorGridLineWidths(x;y;0.25) |
16 | MajorGridLineWidths(y;x;0) |
17 |
| BUBBLE_CHART_05 |
1 | OpenDrawing(250;150) |
2 | ChartData(7 3 9 18 10 5; /* y-values. */ |
3 | 3 6 9 12 6 4) /* Diameters. */ |
4 | |
5 | /* Set up styles. */ |
6 | |
7 | BorderStyle(1;;0.75;#4682b4) |
8 | SymbolStyle(1;plus;5;0.75;#4682b4) |
9 | ShadowStyle(all;2 2 3) |
10 | /* Set up axes. */ |
11 | |
12 | AxisMajorTicks(all;0) |
13 | /* Set up grid. */ |
14 | MajorGridLineWidths(x;y;0.25) |
15 | MajorGridLineWidths(y;x;0) |
16 |