fix(测试跟踪): 测试计划报告统计分析图问题汇总
--bug=1024865 --user=宋昌昌 【测试跟踪】执行计划-UI用例统计分析图Pending和Running状态分开统计显示了 https://www.tapd.cn/55049933/s/1357543 --bug=1024920 --user=宋昌昌 【测试跟踪】-接口自动化场景中包含9个及以上请求时,执行测试计划后测试报告中接口用例分析统计的测试结果的场景请求数柱形图展示不完整 https://www.tapd.cn/55049933/s/1357569
This commit is contained in:
parent
e614b025ed
commit
57149b9618
|
@ -104,12 +104,16 @@ export default {
|
|||
});
|
||||
},
|
||||
setFormatterFunc() {
|
||||
|
||||
let dataCount = 0;
|
||||
let yMax = 0;
|
||||
this.data.forEach(item => {
|
||||
dataCount += item.value;
|
||||
});
|
||||
|
||||
if (this.data && this.data.length === 1) {
|
||||
yMax = dataCount;
|
||||
}
|
||||
|
||||
let formatterFuc = function (item) {
|
||||
return item.data.value + '/' + ((item.data.value / dataCount) * 100).toFixed(0) + '%';
|
||||
};
|
||||
|
@ -121,7 +125,10 @@ export default {
|
|||
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);
|
||||
this.options.xAxis.data = this.data.map(i => i.name);
|
||||
if (yMax !== 0) {
|
||||
this.options.xAxis.max = yMax;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,8 +95,8 @@ export const REPORT_STATUS_MAP = new Map([
|
|||
[
|
||||
"RUNNING",
|
||||
{
|
||||
name: i18n.t("api_test.home_page.detail_card.unexecute"),
|
||||
itemStyle: { color: "#909399" },
|
||||
name: i18n.t("api_test.home_page.detail_card.running"),
|
||||
itemStyle: { color: "#783887" },
|
||||
},
|
||||
],
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue