diff options
author | guochuyicmri <guochuyi@chinamobile.com> | 2019-03-21 19:51:39 +0800 |
---|---|---|
committer | guochuyicmri <guochuyi@chinamobile.com> | 2019-03-21 19:51:47 +0800 |
commit | 8ca667af29ce93f5b801ccfafbf6d14e55640300 (patch) | |
tree | c0eb59d8ffe4862a17b6fe641c21b0a4b05f3b25 /usecaseui-portal/src/app/components/charts/bar | |
parent | c3e53185d6f653727cee2144804aa5404dea6f5a (diff) |
Dashboard Interface Function Modification
Change-Id: Ia3ebdfaa0dd3acde1e626ed500341e0d4ae72142
Issue-ID: USECASEUI-214
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/components/charts/bar')
-rw-r--r-- | usecaseui-portal/src/app/components/charts/bar/bar.component.ts | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/usecaseui-portal/src/app/components/charts/bar/bar.component.ts b/usecaseui-portal/src/app/components/charts/bar/bar.component.ts index a7947f4e..38a2fc0d 100644 --- a/usecaseui-portal/src/app/components/charts/bar/bar.component.ts +++ b/usecaseui-portal/src/app/components/charts/bar/bar.component.ts @@ -8,9 +8,9 @@ import { SimpleChanges } from '@angular/core/src/metadata/lifecycle_hooks'; }) export class BarComponent implements OnInit { - // 图形数据 + // 鍥惧舰鏁版嵁 @Input() chartData; - // 初始化数据 + // 鍒濆鍖栨暟鎹 @Input() initData; constructor() { } @@ -18,36 +18,32 @@ export class BarComponent implements OnInit { ngOnInit() { this.initOpts = { renderer: 'canvas', - height: 40, - width: 160, + height: 200, + width: 280, }; this.barOption = { + tooltip: this.initData.option.tooltip, + grid: this.initData.option.grid, xAxis: this.initData.option.xAxis, - yAxis: { - type: 'category', - show: false, - axisTick: { - show: false - } - }, + yAxis:this.initData.option.yAxis, series: this.initData.option.series } } ngOnChanges(changes: SimpleChanges) { - // 当有实例的时候再执行,相当于第一次不执行下面方法 + // 褰撴湁瀹炰緥鐨勬椂鍊欏啀鎵ц锛岀浉褰撲簬绗竴娆′笉鎵ц涓嬮潰鏂规硶 if (this.chartIntance) { this.chartDataChange() } } - // 初始化图形高度 + // 鍒濆鍖栧浘褰㈤珮搴 initOpts: any; - // 折线图配置 + // 鎶樼嚎鍥鹃厤缃 barOption: any; - // 实例对象 + // 瀹炰緥瀵硅薄 chartIntance: any; - // 数据变化 + // 鏁版嵁鍙樺寲 updateOption: any; chartDataChange() { this.updateOption = this.chartData; |