Available in the Full Version

Linear Gauge - Range Settings

This sample demonstrates setting comparative ranges in the linear gauge control.

Sahara Desert


Sahara summer temperatures can show a daily range of more than 50 ºC - reaching that temperature during the day then plunging below freezing at night. The highest recorded temperature was 58 ºC (136.4 ºF), in Libya.

This sample is designed for a larger screen size.

On mobile, try rotating your screen, view full size, or email to another device.

This sample demonstrates setting comparative ranges in the linear gauge control.

Code View

Copy to Clipboard
<!DOCTYPE html>
<html>
<head>
    <title></title>

    <!-- Ignite UI for jQuery Required Combined CSS Files -->
    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" />
    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/structure/infragistics.css" rel="stylesheet" />

    <!-- Used to style the API Viewer and Explorer UI -->
    <link href="/css/apiviewer.css" rel="stylesheet" type="text/css" />

    <script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.8.3.js"></script>
    <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="http://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>

    <!-- Ignite UI for jQuery Required Combined JavaScript Files -->
    <script src="http://cdn-na.infragistics.com/igniteui/2024.2/latest/js/infragistics.core.js"></script>
    <script src="http://cdn-na.infragistics.com/igniteui/2024.2/latest/js/infragistics.dv.js"></script> 

   

</head>
<body>
    <div >
        <h3>Sahara Desert</h3></div>
    
    <div id="lineargauge" style="width:70%"></div>
    <br />
    Sahara summer temperatures can show a daily range of more than 50 ºC - reaching that temperature during the day then plunging below freezing at night. The highest recorded temperature was 58 ºC (136.4 ºF), in Libya.
    
    <script type="text/javascript">

        $(function () {
            /*----------------- Instantiation -------------------------*/
            var $lineargauge = $("#lineargauge");

            $lineargauge.igLinearGauge({
                width: '100%',
                height: '80px',
                ranges: [
                   {
                       name: 'Cold',
                       startValue: -20,
                       endValue: 0,
                       brush: '#2788B1',
                       outerStartExtent: .2,
                       outerEndExtent: .3
                   },
                   {
                       name: 'Mild',
                       startValue: 0,
                       endValue: 20,
                       brush: '#A4BA29',
                       outerStartExtent: .3,
                       outerEndExtent: .4
                   },
                   {
                       name: 'Warm',
                       startValue: 20,
                       endValue: 40,
                       brush: '#FDBD48',
                       outerStartExtent: .4,
                       outerEndExtent: .5
                   },
                   {
                       name: 'Hot',
                       startValue: 40,
                       endValue: 60,
                       brush: '#D3404B',
                       outerStartExtent: .5,
                       outerEndExtent: .6
                   }
                ],
                showToolTip: true,
                minimumValue: -20,
                maximumValue: 60,
                value: 58,
                interval: 10,
                tickEndExtent:0.2,
                minorTickEndExtent:0.15 
            });

        });
    </script>  
</body>
</html>