From 68551302801caf56c2c76cd73ceb7a55a6260636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E4=B8=BD=E5=90=9B?= <664953382@qq.com> Date: Fri, 11 Feb 2022 11:01:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9spc=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/qualityManage/center2.vue | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/views/bigScreen/qualityManage/center2.vue b/src/views/bigScreen/qualityManage/center2.vue index f7b46cd..d38b215 100644 --- a/src/views/bigScreen/qualityManage/center2.vue +++ b/src/views/bigScreen/qualityManage/center2.vue @@ -85,6 +85,7 @@ export default { productName.push(item.productName); realValue.push(item.realValue); } + const limit = resData.spc.upperLimit - resData.spc.lowerLimit; const dataMin = Math.min.apply(Math, realValue); const dataMax = Math.max.apply(Math, realValue); this.chart.setOption({ @@ -115,16 +116,18 @@ export default { yAxis: { type: "value", name: "", - min: - (dataMin < resData.spc.lowerLimit - ? dataMin - : resData.spc.lowerLimit) - 50, - max: - (dataMax > resData.spc.upperLimit - ? dataMax - : resData.spc.upperLimit) - - 0 + - 50, + min: resData.spc.lowerLimit - limit, + max: resData.spc.upperLimit - 0 + limit, + // min: + // (dataMin < resData.spc.lowerLimit + // ? dataMin + // : resData.spc.lowerLimit) - 50, + // max: + // (dataMax > resData.spc.upperLimit + // ? dataMax + // : resData.spc.upperLimit) - + // 0 + + // 50, axisLabel: { formatter: "{value}", },