The Percent Indicators library contains controls designed to display percentages and ratios. The library provides:
Display elements — sector of circle, portion of rectangle, multiple portions
Preconfigured controls — Dynamic Pie, Pie Chart, Simple Light Blue
Custom controls — Generic Percent
The Generic Percent and Simple Light Blue blocks are probably the most useful blocks in this library. By default, these blocks reflect scalar input values between 0 and 100 by coloring a corresponding segment of a linear scale. By customizing the blocks, you can also have them display an input value X between m and M as the percentage 100 * ((X - m) / (M - m)).
The table below lists some common ways to customize a block in the Percent Indicators library, using its ActiveX® Control Properties dialog box.
|Use a radial percentage scale that reflects the input as a sector of a circle||On the Misc. panel, set DisplayMode to |
|Change the direction in which a radial percentage scale increases||On the Misc. panel, use the Direction property
to reverse the scale's polarity. If Direction is
set to |
|Use a linear percentage scale that reflects the input as a portion of a rectangle||On the Misc. panel, set DisplayMode to |
|Change the direction in which a linear percentage scale increases||On the Misc. panel, use the Orientation property
to indicate whether the linear scale is horizontal or vertical. Use
the Direction property to reverse the scale's
polarity. If Direction is set to |
|Specify the range to use when converting the input to a percentage||On the Misc. panel, use the Min and Max properties.
If the input value is |
100 * ((X - Min) / (Max - Min))
|Display a number near or inside the corresponding colored area||On the Portions panel, set DigitalStyle to |
|Display a number in a fixed position||On the Portions panel, set DigitalStyle to |
To display multiple regions on a single block, see the customizations in the table below. To learn how to control multiple regions simultaneously, see Controlling Multiple Graphical Elements.
|Add another region to the display||On the Portions panel, increase the Portions property. The ID of the new region is the Portions property value minus one. To specify properties of the new region, set PortionID to that ID and then set the remaining properties on the dialog box panel accordingly. Note that the DigitalStyle and DigitalFormat properties apply to all regions on the block.|
|Delete the most recently added region from the display||On the Portions panel, decrease the Portions property. This deletes all properties associated with the region, such as its color.|