fix: 测试计划场景报告柱状图标题缺失

This commit is contained in:
chenjianxing 2021-09-23 11:10:45 +08:00 committed by jianxing
parent 7e9c1e6d01
commit 7b5eba6057
1 changed files with 19 additions and 17 deletions

View File

@ -18,6 +18,22 @@ export default {
return {
visible: false,
options: {
title: {
text: '场景用例数',
subtext: '55',
textAlign:'center',
y: 'center',
padding: 40,
itemGap: 5,
textStyle: {
lineHeight: 30,
fontSize: 16,
},
subtextStyle: {
height: 30,
fontSize: 18,
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
@ -38,20 +54,8 @@ export default {
data: [],
axisLabel: {
formatter: function (value) {
return '';
},
margin: 20,
rich: {
name: {
lineHeight: 30,
fontSize: 16,
align: 'center'
},
count: {
height: 40,
fontSize: 20,
align: 'center',
},
}
}
},
series: [
@ -110,10 +114,8 @@ export default {
this.options.series[0].data = this.data;
this.options.series[0].label.formatter = formatterFuc;
let name = this.name;
this.options.yAxis.axisLabel.formatter = function (value) {
return '{name|' + name + '}\n' + '{count| ' + dataCount + '}';
};
this.options.title.text = this.name;
this.options.title.subtext = dataCount;
this.options.legend.data = this.data.map(i => i.name);
this.options.yAxis.data = this.data.map(i => i.name);