import { Component, OnInit, OnDestroy } from '@angular/core'; @Component({ selector: 'cm-pie-doc-1', templateUrl: './cm-pie-doc-1.component.html', styleUrls: ['./cm-pie-doc-1.component.css'] }) export class CosmosPieDoc1Component implements OnInit, OnDestroy { chartData: any; chartSettings: any; constructor() { this.chartData = { columns: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎'], rows: [ { value: 335, name: '直接访问' }, { value: 310, name: '邮件营销' }, { value: 234, name: '联盟广告' }, { value: 135, name: '视频广告' }, { value: 1548, name: '搜索引擎' } ] } this.chartSettings = { radius: '60%' } } ngOnInit() { } ngOnDestroy() { } }