Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { AmChartsService } from "amcharts3-angular2";
- @Component({
- template: `<div id="chartdiv" [style.width.%]="100" [style.height.px]="500"></div>`
- })
- export class AppComponent {
- private chart: any;
- constructor(private AmCharts: AmChartsService) {}
- ngOnInit() {
- this.chart = this.AmCharts.makeChart("chartdiv", {
- "type": "serial",
- "theme": "light",
- "dataProvider": []
- ...
- });
- }
- ngOnDestroy() {
- this.AmCharts.destroyChart(this.chart);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement