This topic explains, with examples, how to customize the scale of the {BulletGraphName}™ control. This includes positioning the scale inside the control and configuring the scale tick marks and labels. (For the default settings, see the {BulletGraphName} Overview topic.)
The following topics are prerequisites to understanding this topic:
Topic | Purpose |
---|---|
This topic provides conceptual information about the {BulletGraphName} control including its main features, minimum requirements, and user functionality. |
|
This topic explains how to add the {BulletGraphName} control to a {PlatformName} application. |
This topic contains the following sections:
The scale of the {BulletGraphName} control is a logical entity formed by the tick marks and the (numbering) labels. The size and position of the tick marks is configured relative to the Graph area and the position of the numbering labels – relative to the inner edge of the control (the bottom edge at horizontal orientation).
The tick marks of the {BulletGraphName} control identify equal intervals of measure along the graph. Two types of tick marks are supported – major and minor. Both can be positioned along the scale by adjusting the values of the respective extent-related properties which are measured against the Graph area. The tick marks’ exact count, position, look, and frequency of occurrence can be customized by property settings.
As far as the labels are concerned, various aspects of them can be configured such as position, text, format, etc..
The following table explains briefly the configurable aspects of {BulletGraphName} control’s scale and maps them to properties that configure them.
Configurable aspects | Property | Default value |
---|---|---|
Position |
0.05 |
|
0.95 |
||
Min value |
0 |
|
Max value |
100 |
|
Major tick marks |
Not set |
|
0 |
||
0 |
||
0.02 |
||
0.2 |
||
Defined in the default theme |
||
2.0 |
||
Minor tick marks |
3.0 |
|
0.06 |
||
0.2 |
||
Defined in the default theme |
||
1.0 |
||
Labels |
0 |
|
Not set |
||
0 |
||
0 |
||
Color |
The scale’s size and position within the {BulletGraphName} control in the along-the scale-dimension is determined relative to the Graph area. This is done through a pair of properties ( ScaleStartExtent and ScaleEndExtent).
The positioning of the scale in the other (across-the-scale) dimension of the Graph area is not configurable by itself; instead, all elements comprising the scale are configured individually.
Note
Note
|
Note
The value of the |
The following table maps the desired behavior to its respective property settings. For an illustration of the configurable aspects, see the Example.
In order to configure: | Details | Use this property: | And set it to: |
---|---|---|---|
Starting position |
The starting position of the scale relative to the left edge of the Graph area at horizontal orientation or to the bottom edge at vertical orientation. (When the direction of the scale is inverted, these become, respectively, the right edge at horizontal orientation and top edge at vertical orientation. For details, see Configuring the Orientation and Direction.) |
The desired value as a relative part the width/height of the control (depending on the orientation) presented as a fraction of 1 (e.g. 0.2 ) |
|
Ending position |
The ending position of the scale relative to the left edge of the Graph area relative to the left edge of the control in horizontal orientation or to the bottom edge in vertical orientation. (When the direction of the scale is inverted, these become, respectively, the right edge at horizontal orientation and top edge at vertical orientation. For details, see Configuring the Orientation and Direction.) |
The desired value as a relative part the width/height of the control width/height (depending on the orientation) presented as a fraction of 1 (e.g. 0. 8 ) |
The values of the scale are defined by specifying its value range, that is, its minimum and maximum values. This is done with the MinimumValue and MaximumValue properties.
Setting the minimum and maximum values implicitly defines all values within the scale; all values are meant as evenly distributed between the minimum and maximum values. However, only those values are displayed for which there is a numbering label, placed on the scale. (The scale’s values can be displayed only through the numbering labels. The labels display the respective values based on the label’s position on the scale, i.e. the labels’ values are configured through the positioning of the labels along the scale and not set explicitly.) There is no requirement to have labels at the positions of the minimum and maximum values which means that the minimum and maximum values may not be indicated visually on the scale and the scale can look something like this:
Having the scale’s range defined also enables the positioning of the other value-based visual elements on the scale, namely the comparative ranges, comparative marker, and the performance bar. Note that because these elements are value-based, when the scale’s range changes (i.e. when either its minimum or maximum value (or both) changes), these visual elements are re-positioned spatially together with the scale’s values keeping their position on the scale. pick:[sl,wpf="To see this effect in action, refer to the"] pick:[sl=" Range Settings sample"] pick:[wpf=" Range Settings sample"]
The following table maps the desired behavior to its respective property settings. For an illustration of the configurable aspects, see the Example.
In order to configure: | Details | Use this property: | And set it to: |
---|---|---|---|
The minimum value of the scale |
The value at which the scale starts. |
The desired value in the measures of the scale |
|
The maximum value of the scale |
The value at which the scale ends. |
The desired value in the measures of the scale |
The major tick marks of the {BulletGraphName} control can be customized in terms of position and interval at which they occur. The height, thickness, and color of the line segments that forms the major tick marks are configurable as well.
The major tick marks are defined in terms of starting and ending points (the positions of the first and the last tick marks relative to the edges of the Graph area and the interval (the distance from each other) at which they occur. (This is done through the TicksPostInitial, TicksPreTerminal, and Interval properties.) This way, defining the starting and ending points of the major tick marks essentially defines the position and length of the scale.
In the across-the-scale dimension, the length and position of the line segments that form the major tick marks is configured relative to the edges of the Graph area. (This is done through the TickStartExtent and TickEndExtent properties.)
The following table maps the desired behavior to its respective property settings. For an illustration of the configurable aspects, see the Example.
In order to configure: | Details | Use this property: | And set it to: |
---|---|---|---|
Position along the scale, count, and spacing |
|||
Starting point |
The distance at which the major tick marks begin relative to the starting position of the scale |
The desired distance (in the measures of the scale) from scale start position |
|
Ending point |
The distance at which the major tick marks end relative to the ending position of the scale |
The desired distance (in the measures of the scale) from the scale end position |
|
Interval |
The interval at which to place the major tick marks (Interval is the distance – in the measures of the scale – between two adjacent major tick marks.) |
The desired value in measures of the scale |
|
Position across the scale and length of the segments |
|||
Starting point |
The starting point of the line segments that form the major tick marks. (The starting point is defined relative to the bottom of the Graph area in horizontal orientation or to the left edge of the Graph area in vertical orientation.) Negative values are supported as well, indicating positions beneath/ on the left of the Graph area. |
The desired value (in the measures of the scale) as a relative part the height/width of the Graph area (depending on the orientation) presented as a fraction of 1 (e.g. 0.2 ) |
|
Ending point |
The ending point of the line segments that form major tick marks relative to the bottom of the Graph area in horizontal orientation or to the left border of the Graph area in vertical orientation. Negative values are supported as well, indicating positions beneath/ on the left of the Graph area. (The difference between the starting and the ending points forms the length of the marks’ line segments.) |
The desired value as a relative part the height/width of the Graph area (depending on the orientation) presented as a fraction of 1 (e.g. 0. 8 ) |
|
Look-and-feel |
|||
Thickness |
The thickness of the major tick marks’ line segments. |
The desired value in pixels |
|
Color |
The color of the major tick marks |
The desired color |
The screenshot below demonstrates how the {BulletGraphName} looks as a result of the following settings:
Property | Value |
---|---|
30 |
|
Lime |
|
0.9 |
|
30 |
|
10 |
|
0.5 |
|
3 |
Following is the code that implements this example.