Notyetimplement NG2-Chart Angular 2
1- Create a boolean in your component .ts file and set its value like this
import { Inject, PLATFORM_ID } from "@angular/core";
import { isPlatformBrowser } from "@angular/common";
isBrowser: boolean;
constructor(@Inject(PLATFORM_ID) private platformId: unknown) {}
ngOnInit(): void {
this.isBrowser = isPlatformBrowser(this.platformId);
}
2- Then in your HTML file use the ng2-charts HTML tag as below
<canvas *ngIf="isBrowser"
baseChart
...
...
... >
</canvas>
Kamran Taghaddos