Version

Add a Scale to a Gauge

The Scales property displays the range of values on your gauge.

Note
Note:

This topic assumes that you already created a Radial gauge with a Dial. For information on how to create a dial, see Create a Dial.

The next step after adding a scale to your gauge is to Add Tick Marks to a Scale to a Gauge.

You can add scales to your gauge:

When you save and run your application after completing the following steps, your gauge should look similar to the gauge below. The scale on the gauge is not visible until you add tick marks.

A blank radial gauge that has a scale applied (the scale doesn't appear until you add tick marks).

To add scales to your gauge using the Gauge Designer:

  1. In the Gauge Explorer, expand the Scales property.

  2. Click Add Scale and select New Scale.

  3. In the Properties panel, in the Sweep Angle pane set the following properties:

    • Start — 135

    • End — 405

  1. In the Axis pane of the Sweep Angle pane, set the End Value to 100.00.

To add scales to your gauge at design time:

  1. In the Gauges Collection editor window, click the Scales property. Then, click the ellipsis button to open the Scales editor.

  2. In the editor, click Add to add a new Scales.

  3. Set the EndAngle property to 405.

  4. Set the StartAngle property to 135.

  5. Click the Axis property. Then, from the drop-down list, select Numeric Axis.

  6. Expand the Axis property and set the StartValue property to 0\.

  7. Set EndValue to 100.

To add scales to your gauge at run time:

  1. Add the following steps to the load event.

  2. Create instances of the classes:

In Visual Basic:

Dim myScale As New RadialGaugeScale()
Dim numericAxis1 As New NumericAxis()

In C#:

RadialGaugeScale myScale = new RadialGaugeScale();
NumericAxis numericAxis1 = new NumericAxis();
  1. Set the following property:

    • Margin — (10, 10, 10, Pixels)

In Visual Basic:

myRadialGauge.Margin = New Margin(10, 10, 10, 10, Measure.Pixels)

In C#:

myRadialGauge.Margin = new Margin(10, 10, 10, 10, Pixels);
  1. Set the following Axis property and add the numeric axis to the scale:

    • EndValue = 100

In Visual Basic:

numericAxis1.EndValue = 100
myScale.Axes.Add(numericAxis1)

In C#:

numericAxis1.EndValue = 100;
myScale.Axes.Add(numericAxis1);
  1. Set the following properties:

    • EndAngle — 405

    • StartAngle — 135

In Visual Basic:

myScale.EndAngle = 405
myScale.StartAngle = 135

In C#:

myScale.EndAngle = 405;
myScale.StartAngle = 135;
  1. Add your scales to the Scales collection:

In Visual Basic:

myRadialGauge.Scales.Add(myScale)

In C#:

myRadialGauge.Scales.Add(myScale);