refactor(性能测试): 图表使用统一的配色

This commit is contained in:
Captain.B 2021-06-06 09:38:49 +08:00 committed by 刘瑞斌
parent 2cce1e1537
commit 33e9af4cb9
3 changed files with 15 additions and 0 deletions

View File

@ -28,6 +28,8 @@
import MsChart from "@/business/components/common/chart/MsChart";
const color = ['#60acfc', '#32d3eb', '#5bc49f', '#feb64d', '#ff7c7c', '#9287e7', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];
export default {
name: "MonitorCard",
props: ['report'],
@ -73,6 +75,7 @@ export default {
}
});
let option = {
color: color,
title: {
left: 'center',
text: 'CPU使用率',
@ -108,6 +111,7 @@ export default {
}
});
let option = {
color: color,
title: {
left: 'center',
text: '磁盘使用率',
@ -143,6 +147,7 @@ export default {
}
});
let option = {
color: color,
title: {
left: 'center',
text: '入口流量',
@ -178,6 +183,7 @@ export default {
}
});
let option = {
color: color,
title: {
left: 'center',
text: '出口流量',
@ -213,6 +219,7 @@ export default {
}
});
let option = {
color: color,
title: {
left: 'center',
text: '内存使用率',

View File

@ -119,6 +119,7 @@
<script>
import MsChart from "@/business/components/common/chart/MsChart";
const color = ['#60acfc', '#32d3eb', '#5bc49f', '#feb64d', '#ff7c7c', '#9287e7', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];
const CHART_MAP = [
'ActiveThreadsChart',
@ -154,6 +155,7 @@ export default {
},
init: false,
baseOption: {
color: color,
title: {
text: 'Test Details',
left: 'center',

View File

@ -79,6 +79,8 @@
<script>
import MsChart from "@/business/components/common/chart/MsChart";
const color = ['#60acfc', '#32d3eb', '#5bc49f', '#feb64d', '#ff7c7c', '#9287e7', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];
export default {
name: "TestOverview",
components: {MsChart},
@ -138,6 +140,7 @@ export default {
yAxisIndex1List = this._unique(yAxisIndex1List);
let loadOption = {
color: color,
title: {
text: 'Load',
left: 'center',
@ -217,6 +220,7 @@ export default {
yAxisIndex1List = this._unique(yAxisIndex1List);
let resOption = {
color: color,
title: {
text: 'Response Time',
left: 'center',
@ -298,6 +302,7 @@ export default {
yAxisIndex0List = this._unique(yAxisIndex0List);
let errorOption = {
color: color,
title: {
text: 'Errors',
left: 'center',
@ -369,6 +374,7 @@ export default {
yAxisIndex0List = this._unique(yAxisIndex0List);
let resCodeOption = {
color: color,
title: {
text: 'Response code',
left: 'center',