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"
|
:is-share="isShare"
|
||||||
@reportExport="handleExport"
|
@reportExport="handleExport"
|
||||||
@reportSave="handleSave" />
|
@reportSave="handleSave" />
|
||||||
|
|
||||||
<!-- content -->
|
<!-- content -->
|
||||||
<main v-if="isNotRunning">
|
<main v-if="isNotRunning">
|
||||||
<!-- content header chart -->
|
<!-- content header chart -->
|
||||||
@ -704,8 +703,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.content.scenarios && this.content.scenarios[0].requestResults){
|
if (this.content.scenarios && this.content.scenarios[0].requestResults) {
|
||||||
this.content.scenarios[0].requestResults.push({responseResult: {}});
|
this.content.scenarios[0].requestResults.push({ responseResult: {} });
|
||||||
}
|
}
|
||||||
this.reportExportVisible = true;
|
this.reportExportVisible = true;
|
||||||
let reset = this.exportReportReset;
|
let reset = this.exportReportReset;
|
||||||
|
@ -255,6 +255,13 @@ export default {
|
|||||||
return total;
|
return total;
|
||||||
},
|
},
|
||||||
options() {
|
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 {
|
return {
|
||||||
color: ['#67C23A', '#F56C6C', '#F6972A', '#9C9B9A'],
|
color: ['#67C23A', '#F56C6C', '#F6972A', '#9C9B9A'],
|
||||||
tooltip: {
|
tooltip: {
|
||||||
@ -286,6 +293,7 @@ export default {
|
|||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
|
minAngle: 3,
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: ['80%', '90%'],
|
radius: ['80%', '90%'],
|
||||||
avoidLabelOverlap: false,
|
avoidLabelOverlap: false,
|
||||||
@ -301,12 +309,7 @@ export default {
|
|||||||
labelLine: {
|
labelLine: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
data: [
|
data: picData,
|
||||||
{ value: this.content.success, name: 'Success' },
|
|
||||||
{ value: this.content.error, name: 'Error' },
|
|
||||||
{ value: this.content.errorCode, name: 'FakeError' },
|
|
||||||
{ value: this.content.unExecute, name: 'Pending' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user