Compare commits

...

2 Commits

Author SHA1 Message Date
89e053dba0 Merge branch 'bigPic' 2022-02-11 11:01:48 +08:00
6855130280 修改spc上下限 2022-02-11 11:01:15 +08:00

View File

@ -85,6 +85,7 @@ export default {
productName.push(item.productName); productName.push(item.productName);
realValue.push(item.realValue); realValue.push(item.realValue);
} }
const limit = resData.spc.upperLimit - resData.spc.lowerLimit;
const dataMin = Math.min.apply(Math, realValue); const dataMin = Math.min.apply(Math, realValue);
const dataMax = Math.max.apply(Math, realValue); const dataMax = Math.max.apply(Math, realValue);
this.chart.setOption({ this.chart.setOption({
@ -115,16 +116,18 @@ export default {
yAxis: { yAxis: {
type: "value", type: "value",
name: "", name: "",
min: min: resData.spc.lowerLimit - limit,
(dataMin < resData.spc.lowerLimit max: resData.spc.upperLimit - 0 + limit,
? dataMin // min:
: resData.spc.lowerLimit) - 50, // (dataMin < resData.spc.lowerLimit
max: // ? dataMin
(dataMax > resData.spc.upperLimit // : resData.spc.lowerLimit) - 50,
? dataMax // max:
: resData.spc.upperLimit) - // (dataMax > resData.spc.upperLimit
0 + // ? dataMax
50, // : resData.spc.upperLimit) -
// 0 +
// 50,
axisLabel: { axisLabel: {
formatter: "{value}", formatter: "{value}",
}, },