Methods

destroy()

To destroy the digital gauge

  • html
  • <div id="DigitalGauge1"></div>
  • javascript
  • /// <reference path="tsfiles/jquery.d.ts" />
    /// <reference path="tsfiles/ej.web.all.d.ts" />
    
    module DigitalGaugeComponent {
        $(function () {
            var sample = new ej.datavisualization.DigitalGauge($("#DigitalGauge1"),{
            //..//   
            });
     
         sample.destroy(); 
        });
    });
    }

    exportImage(fileName, fileType)

    To export Digital Gauge as Image

  • html
  • <div id="DigitalGauge1"></div>
  • javascript
  • /// <reference path="tsfiles/jquery.d.ts" />
    /// <reference path="tsfiles/ej.web.all.d.ts" />
    
    module DigitalGaugeComponent {
        $(function () {
            var sample = new ej.datavisualization.DigitalGauge($("#DigitalGauge1"),{
            //..//   
            });
     
         sample.exportImage(); 
        });
    });
    }

    getPosition(itemIndex)

    Gets the location of an item that is displayed on the gauge.

  • html
  • <div id="DigitalGauge1"></div>
  • javascript
  • /// <reference path="tsfiles/jquery.d.ts" />
    /// <reference path="tsfiles/ej.web.all.d.ts" />
    
    module DigitalGaugeComponent {
        $(function () {
            var sample = new ej.datavisualization.DigitalGauge($("#DigitalGauge1"),{
            //..//   
            });
     
         sample.getPosition(); 
        });
    });
    }

    getValue(itemIndex)

    ClientSideMethod getValue Gets the value of an item that is displayed on the gauge

  • html
  • <div id="DigitalGauge1"></div>
  • javascript
  • /// <reference path="tsfiles/jquery.d.ts" />
    /// <reference path="tsfiles/ej.web.all.d.ts" />
    
    module DigitalGaugeComponent {
        $(function () {
            var sample = new ej.datavisualization.DigitalGauge($("#DigitalrGauge1"),{
            //..//   
            });
     
         sample.getValue(); 
        });
    });
    }

    refresh()

    Refresh the digital gauge widget

  • html
  • <div id="DigitalGauge1"></div>
  • javascript
  • /// <reference path="tsfiles/jquery.d.ts" />
    /// <reference path="tsfiles/ej.web.all.d.ts" />
    
    module DigitalGaugeComponent {
        $(function () {
            var sample = new ej.datavisualization.DigitalGauge($("#DigitalGauge1"),{
            //..//   
            });
     
         sample.refresh(); 
        });
    });
    }

    setPosition(itemIndex, value)

    ClientSideMethod Set Position Sets the location of an item to be displayed in the gauge

  • html
  • <div id="DigitalGauge1"></div>
  • javascript
  • /// <reference path="tsfiles/jquery.d.ts" />
    /// <reference path="tsfiles/ej.web.all.d.ts" />
    
    module DigitalGaugeComponent {
        $(function () {
            var sample = new ej.datavisualization.DigitalGauge($("#DigitalGauge1"),{
            //..//   
            });
     
         sample.setPosition(); 
        });
    });
    }

    setValue(itemIndex, value)

    ClientSideMethod SetValue Sets the value of an item to be displayed in the gauge.

  • html
  • <div id="DigitalGauge1"></div>
  • javascript
  • /// <reference path="tsfiles/jquery.d.ts" />
    /// <reference path="tsfiles/ej.web.all.d.ts" />
    
    module DigitalGaugeComponent {
        $(function () {
            var sample = new ej.datavisualization.DigitalGauge($("#DigitalGauge1"),{
            //..//   
            });
     
         sample.setValue(); 
        });
    });
    }

    Events

    init

    Triggers when the gauge is initialized.

  • javascript
  • <script>
    
    //init event for Digital gauge
      $(function () {
            var sample = new ej.datavisualization.DigitalGauge($("#gauge"), {
                  init: function () {
                     //..//
                    }
                });
            });
           
    </script>

    itemRendering

    Triggers when the gauge item rendering.

  • javascript
  • <script>
    
    //itemRendering event for Digital gauge
      $(function () {
            var sample = new ej.datavisualization.DigitalGauge($("#gauge"), {
                  itemRendering: function () {
                     //..//
                    }
                });
            });
           
    </script>

    load

    Triggers when the gauge is start to load.

  • javascript
  • <script>
    
    //load event for Digital gauge
      $(function () {
            var sample = new ej.datavisualization.DigitalGauge($("#gauge"), {
                  load: function () {
                     //..//
                    }
                });
            });
           
    </script>

    renderComplete

    Triggers when the gauge render is completed.

  • javascript
  • <script>
    
    //renderComplete event for Digital gauge
      $(function () {
            var sample = new ej.datavisualization.DigitalGauge($("#gauge"), {
                  renderComplete: function () {
                     //..//
                    }
                });
            });
           
    </script>