|
@@ -196,7 +196,7 @@ export default {
|
|
|
return { name: item.label, value: this.newTableList[0]?this.newTableList[0][item.prop]:0 }
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+ let zbz=this.zbz;
|
|
|
var myChart = this.$echarts.init(document.getElementById(id))
|
|
|
var option = {
|
|
|
// color: ['#288DEF'],
|
|
@@ -224,8 +224,21 @@ export default {
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: 'value',
|
|
|
- //scale: true,
|
|
|
+ scale: true,
|
|
|
// inverse: true,
|
|
|
+ min: function(value) {//取最小值向下取整为最小刻度
|
|
|
+ let min=Math.ceil(value.min);
|
|
|
+ if (zbz<min)
|
|
|
+ min=zbz;
|
|
|
+ return min;
|
|
|
+ },
|
|
|
+ max: function(value) {//取最大值向上取整为最大刻度
|
|
|
+ let max=Math.ceil(value.max);
|
|
|
+ if (zbz>max)
|
|
|
+ max=zbz;
|
|
|
+ return max;
|
|
|
+ },
|
|
|
+
|
|
|
show: true,
|
|
|
name: '单位:' + unit,
|
|
|
nameTextStyle: {
|