We have created two types of gauges:
- Round dials have needles that can make complete
revolutions
- Sector dials have needles that travel less
than 360 degrees.
In each category, we provide a basic dial that sets the needle
at the current value, and an extension of the dial that sets a rate
of movement for the needle. The latter component can be used to
make a more realistic-looking gauge because the transition between
values is smoother.
In each case, the components let developers dynamically set parameters
such as the minimum and maximum value, whether or not to show the
background (useful if you just need to display the needle, or overlay
needles as in the hands of a watch), and scaling factors for the
needle, among others. For sector dials, developers can set the minimum
and maximum angles and the direction of positive movement (left-to-right
or right-to-left).
For the smooth dials, we have added an event called RDialTarg
and SDialTarg, respectively
(and which developers can change), which is generated when the needle
reaches the target value. Developers use the setNeedle()
method to make immediate changes (on any dial type), or the xNeedle()
method on the smooth dial components to set a target value (and
begin moving the needle towards that value). |