Search code examples
javascriptangularfrontenddygraphs

How to get isZoomed from underlaying dygraphs when using ng-dygraphs?


Ng-dygraphs is a library that uses Dygraphs library and is prepared for Angular usage. Dygraphs has a property called isZoomed. How to access this property when using NG-dygraphs?


Solution

  • Try this:

    @ViewChild('ngDygraphs') ngDygraphs : ElementRef;
    
    
    <ng-dygraphs
      #ngDygraphs
      [data]="data"
      [options]="options">
    </ng-dygraphs>
    

    and make console.log(this.ngDygraphs) for ngDygraphs and get its attributes. There will be isZoomed property