首页 > 解决方案 > 使用 ng-dygraphs 时如何从底层 dygraphs 中获取 isZoomed?

问题描述

Ng-dygraphs 是一个使用 Dygraphs 库并为 Angular 使用做好准备的库。Dygraphs 有一个名为 isZoomed 的属性。使用 NG-dygraphs 时如何访问此属性?

标签: javascriptangularfrontenddygraphs

解决方案


尝试这个:

@ViewChild('ngDygraphs') ngDygraphs : ElementRef;


<ng-dygraphs
  #ngDygraphs
  [data]="data"
  [options]="options">
</ng-dygraphs>

console.log(this.ngDygraphs)为 ngDygraphs 制作并获取其属性。会有isZoomed财产


推荐阅读