From 0abd7209e03fe6bc3717015dcba8c4b2c3cb7454 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 4 Dec 2020 17:56:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E4=B8=AA=E7=BA=BF=E7=A8=8B=E7=BB=84?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E8=AE=BE=E7=BD=AE=E7=BA=BF=E7=A8=8B=E6=95=B0?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/components/PerformancePressureConfig.vue | 9 +++++---- .../test/components/PerformancePressureConfig.vue | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/src/business/components/performance/report/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/report/components/PerformancePressureConfig.vue index 096146e3d3..18c67b8af8 100644 --- a/frontend/src/business/components/performance/report/components/PerformancePressureConfig.vue +++ b/frontend/src/business/components/performance/report/components/PerformancePressureConfig.vue @@ -226,8 +226,9 @@ export default { if (handler.rampUpTime < handler.step) { handler.step = handler.rampUpTime; } + let color = ['#60acfc', '#32d3eb', '#5bc49f', '#feb64d', '#ff7c7c', '#9287e7', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3']; handler.options = { - color: ['#60acfc', '#32d3eb', '#5bc49f', '#feb64d', '#ff7c7c', '#9287e7', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'], + color: color, xAxis: { type: 'category', boundaryGap: false, @@ -261,10 +262,10 @@ export default { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, - color: hexToRgba(handler.options.color[i], 0.3), + color: hexToRgba(color[i % color.length], 0.3), }, { offset: 0.8, - color: hexToRgba(handler.options.color[i], 0), + color: hexToRgba(color[i % color.length], 0), }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 @@ -272,7 +273,7 @@ export default { }, itemStyle: { normal: { - color: hexToRgb(handler.options.color[i]), + color: hexToRgb(color[i % color.length]), borderColor: 'rgba(137,189,2,0.27)', borderWidth: 12 } diff --git a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue index 5d98032542..c531212baa 100644 --- a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue @@ -268,8 +268,9 @@ export default { if (handler.rampUpTime < handler.step) { handler.step = handler.rampUpTime; } + let color = ['#60acfc', '#32d3eb', '#5bc49f', '#feb64d', '#ff7c7c', '#9287e7', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3']; handler.options = { - color: ['#60acfc', '#32d3eb', '#5bc49f', '#feb64d', '#ff7c7c', '#9287e7', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'], + color: color, xAxis: { type: 'category', boundaryGap: false, @@ -302,10 +303,10 @@ export default { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, - color: hexToRgba(handler.options.color[i], 0.3), + color: hexToRgba(color[i % color.length], 0.3), }, { offset: 0.8, - color: hexToRgba(handler.options.color[i], 0), + color: hexToRgba(color[i % color.length], 0), }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 @@ -313,7 +314,7 @@ export default { }, itemStyle: { normal: { - color: hexToRgb(handler.options.color[i]), + color: hexToRgb(color[i % color.length]), borderColor: 'rgba(137,189,2,0.27)', borderWidth: 12 }