echarts---计算管道最大最小值
function zf(datalistt){
for (var i = 0; i < datalistt.length; i++) {
var MaxDataNum = datalistt[i].MaxValue;
var MinDataNum = datalistt[i].MinValue;
if (MaxDataNum == MinDataNum) {
maximum_max[i] = (Number(MinDataNum) + 2 * (data_count - i) - 1).toFixed(2);
maximum_min[i] = (Number(MinDataNum) - 2 * i - 1).toFixed(2);
}else{
//-------- 直方图(柱状图)---------
if(i<4 ){
if(MaxDataNum * MinDataNum >0) {
if(MaxDataNum > 0){
MinDataNum = 0;
}else{
MaxDataNum = 0;
}
}
}
//-----------------------------
var maxmin = Number(MaxDataNum) - Number(MinDataNum);
maximum_max[i] = (Number(MinDataNum) + maxmin * (data_count - i)).toFixed(2);
maximum_min[i] = (Number(MinDataNum) - maxmin * i).toFixed(2);
}
}
}
//柱状图 管道不存合显示
series: [
{ barGap: '-100%', }
]