Field controlsModel-driven app

Linear gauge

A read-only custom control that draws a number as a filled bar against a minimum and a maximum.

Show me in the demoOpens the demo app with this component highlighted.

What it is

The Linear gauge is a custom control that turns a number column into a horizontal bar. The filled part shows the value, a scale below shows the minimum, the middle and the maximum, and a label such as 60 of 100 states the figure. The user cannot change the value from the gauge.

When to use it

Use it for a figure that someone else or a process sets and that people only need to read at a glance, such as progress or capacity used. If the user should change the value, use the Slider. If an exact figure matters more than the picture, keep the Whole number, decimal and float control.

Licensing and configuration

No extra licence. In the older form editor you select the column, open the Controls tab, choose Add Control and pick Linear Gauge, then bind its minimum and maximum. Microsoft deprecated the Linear Gauge in 2021 along with the Flip Switch, Linear Slider, Radial Knob and Arc Knob, and said it would stop being addable to forms. Check that your environment still offers it before you plan around it.

Pitfalls

  • The gauge is read only, so a user who expects to click it to edit the value gets no response.
  • A value above the maximum or below the minimum is clipped visually, which hides bad data. Add validation on the column.
  • Colour alone does not tell users whether the value is good or bad. Show the number as well.
  • Because the control is deprecated, a chart or a view column may serve better for new work.

Try it in the demo

  1. Open the Accelerator form at the deep link and scroll to the Custom controls section.
  2. Read the Linear gauge. It shows the same column as the Slider.
  3. Move the Slider and watch the gauge bar and its label update.
  4. Try to click the gauge. Nothing changes, because the control is read only.