-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
76d8cfa
commit 419d363
Showing
9 changed files
with
56 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { ElementRef, OnChanges, AfterViewInit } from '@angular/core'; | ||
export declare class NvD3Component implements OnChanges, AfterViewInit { | ||
import { ElementRef, OnChanges, OnInit } from '@angular/core'; | ||
export declare class NvD3Component implements OnChanges, OnInit { | ||
private el; | ||
private options; | ||
private data; | ||
options: any; | ||
data: any; | ||
private ngNvD3; | ||
constructor(el: ElementRef); | ||
ngOnChanges(): void; | ||
ngAfterViewInit(): void; | ||
ngOnInit(): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { ElementRef, OnChanges, AfterViewInit } from '@angular/core'; | ||
export declare class NvD3Directive implements OnChanges, AfterViewInit { | ||
import { ElementRef, OnChanges, OnInit } from '@angular/core'; | ||
export declare class NvD3Directive implements OnChanges, OnInit { | ||
private el; | ||
private options; | ||
private data; | ||
options: any; | ||
data: any; | ||
private ngNvD3; | ||
constructor(el: ElementRef); | ||
ngOnChanges(): void; | ||
ngAfterViewInit(): void; | ||
ngOnInit(): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import { Component, ElementRef, Input, OnChanges, AfterViewInit } from '@angular/core'; | ||
import { Component, ElementRef, Input, OnChanges, OnInit } from '@angular/core'; | ||
import { Angular2NvD3 } from './angular2-nvd3.core'; | ||
|
||
@Component({ selector: 'app-nvd3', template: '' }) | ||
export class NvD3Component implements OnChanges, AfterViewInit { | ||
export class NvD3Component implements OnChanges, OnInit { | ||
@Input() | ||
private options: any; | ||
public options: any; | ||
|
||
@Input() | ||
private data: any; | ||
public data: any; | ||
|
||
private ngNvD3: any; | ||
|
||
constructor(private el: ElementRef) { | ||
this.ngNvD3 = Angular2NvD3.NgNvD3.getInstance(this.el, this.data, this.options); | ||
this.ngNvD3 = Angular2NvD3.NgNvD3.getInstance(this.el); | ||
} | ||
|
||
ngOnChanges() { | ||
this.ngNvD3.updateWithOptions(); | ||
this.ngNvD3.updateWithOptions(this.options, this.data); | ||
} | ||
|
||
ngAfterViewInit() { | ||
ngOnInit() { | ||
this.ngNvD3.isViewInitialize(true); | ||
this.ngNvD3.updateWithOptions(); | ||
this.ngNvD3.updateWithOptions(this.options, this.data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import { Directive, ElementRef, Input, OnChanges, AfterViewInit } from '@angular/core'; | ||
import { Directive, ElementRef, Input, OnChanges, OnInit } from '@angular/core'; | ||
import { Angular2NvD3 } from './angular2-nvd3.core'; | ||
|
||
@Directive({ selector: '[appNvD3]' }) | ||
export class NvD3Directive implements OnChanges, AfterViewInit { | ||
export class NvD3Directive implements OnChanges, OnInit { | ||
@Input() | ||
private options: any; | ||
public options: any; | ||
|
||
@Input() | ||
private data: any; | ||
public data: any; | ||
|
||
private ngNvD3: any; | ||
|
||
constructor(private el: ElementRef) { | ||
this.ngNvD3 = Angular2NvD3.NgNvD3.getInstance(this.el, this.data, this.options); | ||
this.ngNvD3 = Angular2NvD3.NgNvD3.getInstance(this.el); | ||
} | ||
|
||
ngOnChanges() { | ||
this.ngNvD3.updateWithOptions(); | ||
this.ngNvD3.updateWithOptions(this.options, this.data); | ||
} | ||
|
||
ngAfterViewInit() { | ||
ngOnInit() { | ||
this.ngNvD3.isViewInitialize(true); | ||
this.ngNvD3.updateWithOptions(); | ||
this.ngNvD3.updateWithOptions(this.options, this.data); | ||
} | ||
} |