|
@ -917,8 +917,13 @@ function initSensorPiezometerchart(){ |
|
|
}, |
|
|
}, |
|
|
axisLabel: { |
|
|
axisLabel: { |
|
|
fontSize: 24, |
|
|
fontSize: 24, |
|
|
distance: 12, |
|
|
distance: 24, |
|
|
formatter: '{value}' |
|
|
formatter: function (value){ |
|
|
|
|
|
if(value==0){ |
|
|
|
|
|
return ; |
|
|
|
|
|
} |
|
|
|
|
|
return value; |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
pointer: { |
|
|
pointer: { |
|
|
show:true, |
|
|
show:true, |
|
@ -1098,6 +1103,31 @@ function updateChartsOptions(modiflyMap){ |
|
|
// 获取数据属性
|
|
|
// 获取数据属性
|
|
|
const optionStr= optionNode.getAttribute("option"); |
|
|
const optionStr= optionNode.getAttribute("option"); |
|
|
const option=JSON.parse(optionStr); |
|
|
const option=JSON.parse(optionStr); |
|
|
|
|
|
const rect=JSON.parse(current_edit_obj.attr("pi-rect")); |
|
|
|
|
|
const max_m= Math.max(...rect); |
|
|
|
|
|
const min_m= Math.min(...rect); |
|
|
|
|
|
let isCircle=null; |
|
|
|
|
|
if(max_m<0){ |
|
|
|
|
|
isCircle=false; |
|
|
|
|
|
}else if(min_m>0){ |
|
|
|
|
|
isCircle=false; |
|
|
|
|
|
}else{ |
|
|
|
|
|
isCircle=Math.abs(rect[0])+Math.abs(rect[1])==360; |
|
|
|
|
|
} |
|
|
|
|
|
const pimin=Number(current_edit_obj.attr('pimin')); |
|
|
|
|
|
if(isCircle){ |
|
|
|
|
|
option.series[0].axisLabel.formatter=function (value){ |
|
|
|
|
|
if(value==pimin){ |
|
|
|
|
|
return ; |
|
|
|
|
|
} |
|
|
|
|
|
return Number(value).toFixed(0); |
|
|
|
|
|
}; |
|
|
|
|
|
}else { |
|
|
|
|
|
option.series[0].axisLabel.formatter = function (value) { |
|
|
|
|
|
return Number(value).toFixed(0); |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 获取地图
|
|
|
// 获取地图
|
|
|
var chart = getEchartObj(); |
|
|
var chart = getEchartObj(); |
|
|
|
|
|
|
|
@ -1559,14 +1589,29 @@ function reinitChartObj(){ |
|
|
var json = $(this).attr("option"); |
|
|
var json = $(this).attr("option"); |
|
|
var option=JSON.parse(json); |
|
|
var option=JSON.parse(json); |
|
|
if(nid=='5'&&cid=='6'){ |
|
|
if(nid=='5'&&cid=='6'){ |
|
|
var picompany=parentEl.attr('picompany'); |
|
|
const rect=JSON.parse(parentEl.attr("pi-rect")); |
|
|
if(picompany){ |
|
|
const max_m= Math.max(...rect); |
|
|
|
|
|
const min_m= Math.min(...rect); |
|
|
|
|
|
let isCircle=null; |
|
|
|
|
|
if(max_m<0){ |
|
|
|
|
|
isCircle=false; |
|
|
|
|
|
}else if(min_m>0){ |
|
|
|
|
|
isCircle=false; |
|
|
|
|
|
}else{ |
|
|
|
|
|
isCircle=Math.abs(rect[0])+Math.abs(rect[1])==360; |
|
|
|
|
|
} |
|
|
|
|
|
const pimin=Number(parentEl.attr('pimin')); |
|
|
|
|
|
if(isCircle){ |
|
|
option.series[0].axisLabel.formatter=function (value){ |
|
|
option.series[0].axisLabel.formatter=function (value){ |
|
|
if (value === 0) { |
|
|
if(value==pimin){ |
|
|
return ''; |
|
|
return ; |
|
|
} |
|
|
} |
|
|
return value + picompany; |
|
|
return Number(value).toFixed(0); |
|
|
} |
|
|
}; |
|
|
|
|
|
}else { |
|
|
|
|
|
option.series[0].axisLabel.formatter = function (value) { |
|
|
|
|
|
return Number(value).toFixed(0); |
|
|
|
|
|
}; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
var myChart = echarts.init($(this)[0]); |
|
|
var myChart = echarts.init($(this)[0]); |
|
|