New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Linear Gauge

  • Demo Configurator
  • Spin UpSpin Down
  • Gauge orientationVertical
  • Main background color
    Pick Color(Current Color is blank)

The Linear Gauge is one of the flavours that are available in the RadGauge control family. It represents the value on a linear scale much like a thermometer would.

The specific properties that make it different are mostly related to the pointer - it can be either a small triangular tick (similar to an arrow), or an entire bar like a thermometer. It can be either horizontal or vertical.

This demo shows the basics of the Linear Gauge control. Examining the code will show the basic markup - tags and properties, the code-behind logic will show the code structure.

Some logic is incorporated for the configurator to keep the gauge appearance when changing properties. Also, setting a value that is outside of the range will result in either a min or max value being set, if you disregard the instructions in the value textbox before clicking the configure button.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.Web.Examples.Gauge.Types.LinearGauge.DefaultCS" %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <telerik:AjaxSetting AjaxControlID="ConfigurationPanel1">
                    <telerik:AjaxUpdatedControl ControlID="RadLinearGauge1" LoadingPanelID="RadAjaxLoadingPanelConfiguration" />
                    <telerik:AjaxUpdatedControl ControlID="ConfiguratorPanel1" />
    <div class="demo-containers">
        <div class="demo-container">
            <telerik:RadLinearGauge runat="server" ID="RadLinearGauge1" Width="150px" Height="350px">
                <Pointer Shape="BarIndicator" Value="15">
                    <Track Opacity="0.2" />
                <Scale Min="-20" Max="50" MajorUnit="10">
                    <Labels Format="{0} degrees" />
                        <telerik:GaugeRange Color="#2a94cb" From="-20" To="5" />
                        <telerik:GaugeRange Color="#8dcb2a " From="5" To="17" />
                        <telerik:GaugeRange Color="#ffc700" From="17" To="27" />
                        <telerik:GaugeRange Color="#ff7a00" From="27" To="35" />
                        <telerik:GaugeRange Color="#c20000" From="35" To="50" />
    <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanelConfiguration">
    <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1">
                <qsf:ConfiguratorColumn runat="server" Size="Medium">
                    <ul class="fb-group">
                            <qsf:NumericTextBox Label="Enter value between -20 and 50" runat="server"
                                MinValue="-20" MaxValue="50" Size="Medium" ID="NewValueNumericBox" AutoPostBack="true" Value="15" AllowOutOfRangeAutoCorrect="true">
                            <qsf:DropDownList Label="Gauge orientation" runat="server" ID="OrientationComboBox" AutoPostBack="true" Size="Medium">
                                    <telerik:DropDownListItem Text="Vertical" Value="Vertical" Selected="true" />
                                    <telerik:DropDownListItem Text="Horizontal" Value="Horizontal" />
                <qsf:ConfiguratorColumn runat="server" Size="Medium">
                    <ul class="fb-group">
                            <qsf:ColorPicker Label="Main background color" runat="server" ID="MainBackgroundColorPicker" ShowIcon="true" Size="Auto" AutoPostBack="true">
                            <span class="checkbox">
                                <asp:CheckBox runat="server" ID="IsReversedCheckBox" Text="Is Reversed (changes values position)" AutoPostBack="true" />
                            <span class="checkbox">
                                <asp:CheckBox runat="server" ID="IsMirroredCheckBox" Text="Is Mirrored (changes labels position)" AutoPostBack="true" />

Support & Learning Resources

Find Assistance