Skip to content

Instantly share code, notes, and snippets.

@whisher
Created January 6, 2018 15:01
Show Gist options
  • Save whisher/88082a64a901ebd288779329a3990625 to your computer and use it in GitHub Desktop.
Save whisher/88082a64a901ebd288779329a3990625 to your computer and use it in GitHub Desktop.
export class MychartComponent implements AfterViewInit, OnDestroy {
chart: Highcharts.ChartObject;
@Input() options;
constructor(private el: ElementRef) { }
ngAfterViewInit() {
this.chart = chart(this.el.nativeElement, this.options);
}
ngOnDestroy() {
this.chart = null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment