mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 03:58:33 +08:00
style(接口测试): 优化接口测试报告的饼状图
优化接口测试报告的饼状图,当某个扇面过于小时使用一个最小尺寸,避免饼状图看不到这一部分
This commit is contained in:
parent
c5d061f30b
commit
506d29765d
@ -18,7 +18,6 @@
|
||||
:is-share="isShare"
|
||||
@reportExport="handleExport"
|
||||
@reportSave="handleSave" />
|
||||
|
||||
<!-- content -->
|
||||
<main v-if="isNotRunning">
|
||||
<!-- content header chart -->
|
||||
@ -704,8 +703,8 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(this.content.scenarios && this.content.scenarios[0].requestResults){
|
||||
this.content.scenarios[0].requestResults.push({responseResult: {}});
|
||||
if (this.content.scenarios && this.content.scenarios[0].requestResults) {
|
||||
this.content.scenarios[0].requestResults.push({ responseResult: {} });
|
||||
}
|
||||
this.reportExportVisible = true;
|
||||
let reset = this.exportReportReset;
|
||||
|
@ -255,6 +255,13 @@ export default {
|
||||
return total;
|
||||
},
|
||||
options() {
|
||||
let picData = [
|
||||
{ value: this.content.success > 0 ? this.content.success : '-', name: 'Success' },
|
||||
{ value: this.content.error > 0 ? this.content.error : '-', name: 'Error' },
|
||||
{ value: this.content.errorCode > 0 ? this.content.errorCode : '-', name: 'FakeError' },
|
||||
{ value: this.content.unExecute > 0 ? this.content.unExecute : '-', name: 'Pending' },
|
||||
];
|
||||
|
||||
return {
|
||||
color: ['#67C23A', '#F56C6C', '#F6972A', '#9C9B9A'],
|
||||
tooltip: {
|
||||
@ -286,6 +293,7 @@ export default {
|
||||
],
|
||||
series: [
|
||||
{
|
||||
minAngle: 3,
|
||||
type: 'pie',
|
||||
radius: ['80%', '90%'],
|
||||
avoidLabelOverlap: false,
|
||||
@ -301,12 +309,7 @@ export default {
|
||||
labelLine: {
|
||||
show: false,
|
||||
},
|
||||
data: [
|
||||
{ value: this.content.success, name: 'Success' },
|
||||
{ value: this.content.error, name: 'Error' },
|
||||
{ value: this.content.errorCode, name: 'FakeError' },
|
||||
{ value: this.content.unExecute, name: 'Pending' },
|
||||
],
|
||||
data: picData,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user