Methods

destroy

You can destroy the Digital Gauge widget by calling it’s destroy() method.

  • html
  • <div id="DigitalGauge1">Digital Gauge</div> 
    
    <script>
    $("#DigitalGauge1").ejDigitalGauge();
    var graphObj = $("#DigitalGauge1").data("ejDigitalGauge");
    graphObj.destroy();
    </script>

    getPosition(itemIndex)

    To get the location of an item that is displayed on the gauge you can use getPosition() method.

    Name Type Description
  • html
  • itemIndex
    number Position value of an item that is displayed on the gauge.

    Returns: object

  • html
  • <div id="DigitalGauge1"></div> 
     
    <script>
    $("#DigitalGauge1").ejDigitalGauge();
    var DigitalGaugeObj = $("#DigitalGauge1").data("ejDigitalGauge");
    DigitalGaugeObj.getPosition(0); 
    </script>

    getValue(itemIndex)

    You can get the value of the item that is displayed on the gauge using getValue() method.

    Name Type Description
  • html
  • itemIndex
    number Index value of an item that displayed on the gauge

    Returns: object

  • html
  • <div id="DigitalGauge1"></div> 
     
    <script>
    $("#DigitalGauge1").ejDigitalGauge();
    var DigitalGaugeObj = $("#DigitalGauge1").data("ejDigitalGauge");
    DigitalGaugeObj.getValue(0);    
    </script>

    refresh()

    To refresh the Digital Gauge, you can call it’s refresh method.

  • html
  • <div id="DigitalGauge1"></div> 
     
    <script>
    $("#DigitalGauge1").ejDigitalGauge();
    var GaugeObj = $("#DigitalGauge1").data("ejDigitalGauge");
    GaugeObj.refresh();
    </script>

    setPosition(itemIndex, value)

    Using setPosition() method, you can set the location of an item to be displayed in the digital gauge.

    Name Type Description
  • html
  • itemIndex
    number Index value of the digital gauge item
  • html
  • value
    object Location value of the digital gauge
  • html
  • <div id="DigitalGauge1"></div> 
     
    <script>
    $("#DigitalGauge1").ejDigitalGauge();
    var DigitalGaugeObj = $("#DigitalGauge1").data("ejDigitalGauge");
    DigitalGaugeObj.setPosition(0,{ x:50, y:40 });  
    </script>

    setValue(itemIndex, value)

    Using setValue method,you can set the value of an item to be displayed in the digital gauge.

    Name Type Description
  • html
  • itemIndex
    number Index value of the digital gauge item
  • html
  • value
    string Text value to be displayed in the gaugeS
  • html
  • <div id="DigitalGauge1"></div> 
     
    <script>
    $("#DigitalGauge1").ejDigitalGauge();
    var DigitalGaugeObj = $("#DigitalGauge1").data("ejDigitalGauge");
    DigitalGaugeObj.setValue(0,"Welcome");
    </script>

    Events

    init

    init event triggers, when gauge is initialized.

  • html
  • <div id="DigitalCore"></div> 
     
    <script>
    $("#DigitalCore").ejDigitalGauge({
       init: function (args) {}
    });      
    </script>

    itemRendering

    itemRendering event triggers, when gauge item is rendering.

  • html
  • <div id="DigitalCore"></div> 
     
    <script>
    $("#DigitalCore").ejDigitalGauge({
       itemRendering: function (args) {}
    });      
    </script>

    load

    load event triggers, when gauge is starting to load.

  • html
  • <div id="DigitalCore"></div> 
     
    <script>
    $("#DigitalCore").ejDigitalGauge({
       load: function (args) {}
    });      
    </script>

    renderComplete

    renderComplete event triggers, when gauge rendering is completed.

  • html
  • <div id="DigitalCore"></div> 
     
    <script>
    $("#DigitalCore").ejDigitalGauge({
       renderComplete: function (args) {}
    });       
    </script>

    click

    click event triggers on clicking the gauges.

  • html
  • <div id="DigitalCore"></div> 
     
    <script>
    $("#DigitalCore").ejDigitalGauge({
    
        click: function (args) {
                  //Do something
        }
       
    });      
    </script>

    doubleClick

    doubleClick event triggers on double clicking the gauges.

  • html
  • <div id="DigitalCore"></div> 
     
    <script>
    $("#DigitalCore").ejDigitalGauge({
    
        doubleClick: function (args) {
                  //Do something
        }
       
    });       
    </script>

    rightClick

    rightClick event triggers on right clicking the gauges.

  • html
  • <div id="DigitalCore"></div> 
     
    <script>
    $("#DigitalCore").ejDigitalGauge({
        rightClick: function (args) {
                  //Do something
        }
       
    });       
    </script>