Methods

destroy()

To destroy the digital gauge

  • ts
  • export class AppComponent {
    
    destroy(){          
           
         this.digital.widget.destroy();
         
         }
    
    // Create digital gauge instance
    @ViewChild('gauge') digital: EJComponents<any, any>;
    
    }

    exportImage(fileName, fileType)

    To export Digital Gauge as Image

  • ts
  • export class AppComponent {
    
    exportImage(){
         
         this.digital.widget.exportImage("myImage","jpeg");
    
    }
    
    // Create digital gauge instance
    @ViewChild('gauge') digital: EJComponents<any, any>;
    
    }

    getPosition(itemIndex)

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

  • ts
  • export class AppComponent {
    
    getPosition(){
         
         this.digital.widget.getPosition(0);
    
    }
    
    // Create digital gauge instance
    @ViewChild('gauge') digital: EJComponents<any, any>;
    
    }

    getValue(itemIndex)

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

  • ts
  • export class AppComponent {
    
    getValue(){
         
         this.digital.widget.getValue(0);
    
    }
    
    // Create digital gauge instance
    @ViewChild('gauge') digital: EJComponents<any, any>;
    
    }

    refresh()

    Refresh the digital gauge widget

  • ts
  • export class AppComponent {
    
    refresh(){   
        
             this.digital.widget.refresh();
             
             }
    
    // Create digital gauge instance
    @ViewChild('gauge') digital: EJComponents<any, any>;
    
    }

    setPosition(itemIndex, value)

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

  • ts
  • export class AppComponent {
    
    setPosition(){
         
         this.digital.widget.setPosition(0,{x:10,y:10});
    
    }
    
    // Create digital gauge instance
    @ViewChild('gauge') digital: EJComponents<any, any>;
    
    }

    setValue(itemIndex, value)

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

  • ts
  • export class AppComponent {
    
    setValue(){
         
         this.digital.widget.setValue(0, "Welcome");
    
    }
    
    // Create digital gauge instance
    @ViewChild('gauge') digital: EJComponents<any, any>;
    
    }

    Events

    init

    Triggers when the gauge is initialized.

  • ts
  • init(sender) {
        
        // Do something
        
        }
  • html
  • <ej-digitalgauge id="DigitalGauge1" (init)="init($event)">
    </ej-digitalgauge>

    itemRendering

    Triggers when the gauge item rendering.

  • ts
  • itemRendering(sender) {
        
        // Do something
        
        }
  • html
  • <ej-digitalgauge id="DigitalGauge1" (itemRendering)="itemRendering($event)">
    </ej-digitalgauge>

    load

    Triggers when the gauge is start to load.

  • ts
  • load(sender) {        
        
        // Do something      
        
          }
  • html
  • <ej-digitalgauge id="DigitalGauge1" (load)="load($event)">
          </ej-digitalgauge>

    renderComplete

    Triggers when the gauge render is completed.

  • ts
  • complete(sender) {
        
        // Do something
        
        }
  • html
  • <ej-digitalgauge id="DigitalGauge1" (renderComplete)="complete($event)">
    </ej-digitalgauge>