Compare commits
2 Commits
37a1bfe508
...
89e053dba0
Author | SHA1 | Date | |
---|---|---|---|
89e053dba0 | |||
6855130280 |
@ -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}",
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user