import { Component, OnInit, OnDestroy } from '@angular/core'; @Component({ selector: 'cm-stitches-doc-2', templateUrl: './cm-stitches-doc-2.component.html', styleUrls: ['./cm-stitches-doc-2.component.css'] }) export class CosmosStitchesDoc2Component implements OnInit, OnDestroy { chartData: any; chartSettings: any; constructor() { this.chartData = { columns: ['日期', '成本', '利润', '占比', '其他'], rows: [ { '成本': 1523, '日期': '1月1日', '利润': 1523, '占比': 0.12, '其他': 800 }, { '成本': 1223, '日期': '1月2日', '利润': 1523, '占比': 0.345, '其他': 100 }, { '成本': 2123, '日期': '1月3日', '利润': 1523, '占比': 0.7, '其他': 600 }, { '成本': 4123, '日期': '1月4日', '利润': 1523, '占比': 0.31, '其他': 300 }, { '成本': 3123, '日期': '1月5日', '利润': 1523, '占比': 0.12, '其他': 200 }, { '成本': 7123, '日期': '1月6日', '利润': 1523, '占比': 0.65, '其他': 700 } ] }; this.chartSettings = { axisSite: { right: ['占比'] }, yAxisType: ['KMB', 'percent'], yAxisName: ['数值', '比率'] } } ngOnInit() { } ngOnDestroy() { } }