summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/components/charts/bar
diff options
context:
space:
mode:
authorguochuyicmri <guochuyi@chinamobile.com>2019-03-21 19:51:39 +0800
committerguochuyicmri <guochuyi@chinamobile.com>2019-03-21 19:51:47 +0800
commit8ca667af29ce93f5b801ccfafbf6d14e55640300 (patch)
treec0eb59d8ffe4862a17b6fe641c21b0a4b05f3b25 /usecaseui-portal/src/app/components/charts/bar
parentc3e53185d6f653727cee2144804aa5404dea6f5a (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.ts28
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;