import { Component, OnInit, OnDestroy } from '@angular/core'; @Component({ selector: 'cm-radar-doc-2', templateUrl: './cm-radar-doc-2.component.html', styleUrls: ['./cm-radar-doc-2.component.css'] }) export class CosmosRadarDoc2Component implements OnInit, OnDestroy { chartData: any; chartSettings: any; constructor() { this.chartData = { columns: ['日期', '销售(sales)', '管理(Administration)', '客服(Customer Support)', '研发(Development)', '市场占比(Marketing Percent)'], rows: [ { '日期': '1月1日', '销售(sales)': 41300, '管理(Administration)': 10000, '客服(Customer Support)': 28000, '研发(Development)': 50000, '市场占比(Marketing Percent)': 0.12}, { '日期': '1月2日', '销售(sales)': 50000, '管理(Administration)': 4523, '客服(Customer Support)': 28900, '研发(Development)': 38000, '市场占比(Marketing Percent)': 0.2}, { '日期': '1月3日', '销售(sales)': 28000, '管理(Administration)': 5560, '客服(Customer Support)': 22070, '研发(Development)': 45000, '市场占比(Marketing Percent)': 0.18}, { '日期': '1月4日', '销售(sales)': 48123, '管理(Administration)': 3618, '客服(Customer Support)': 24060, '研发(Development)': 52000, '市场占比(Marketing Percent)': 0.3}, { '日期': '1月5日', '销售(sales)': 30123, '管理(Administration)': 6092, '客服(Customer Support)': 18090, '研发(Development)': 29000, '市场占比(Marketing Percent)': 0.15}, { '日期': '1月6日', '销售(sales)': 17123, '管理(Administration)': 7035, '客服(Customer Support)': 17900, '研发(Development)': 40670, '市场占比(Marketing Percent)': 0.05} ] }; this.chartSettings = { dimension: ['日期'], metrics: ['销售(sales)', '管理(Administration)', '客服(Customer Support)', '研发(Development)', '市场占比(Marketing Percent)'], dataType: { '市场占比(Marketing Percent)': 'percent' } }; } ngOnInit() { } ngOnDestroy() { } }