|
|
@ -917,8 +917,13 @@ function initSensorPiezometerchart(){ |
|
|
|
}, |
|
|
|
axisLabel: { |
|
|
|
fontSize: 24, |
|
|
|
distance: 12, |
|
|
|
formatter: '{value}' |
|
|
|
distance: 24, |
|
|
|
formatter: function (value){ |
|
|
|
if(value==0){ |
|
|
|
return ; |
|
|
|
} |
|
|
|
return value; |
|
|
|
} |
|
|
|
}, |
|
|
|
pointer: { |
|
|
|
show:true, |
|
|
@ -1098,6 +1103,31 @@ function updateChartsOptions(modiflyMap){ |
|
|
|
// 获取数据属性
|
|
|
|
const optionStr= optionNode.getAttribute("option"); |
|
|
|
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(); |
|
|
|
|
|
|
@ -1559,14 +1589,29 @@ function reinitChartObj(){ |
|
|
|
var json = $(this).attr("option"); |
|
|
|
var option=JSON.parse(json); |
|
|
|
if(nid=='5'&&cid=='6'){ |
|
|
|
var picompany=parentEl.attr('picompany'); |
|
|
|
if(picompany){ |
|
|
|
const rect=JSON.parse(parentEl.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(parentEl.attr('pimin')); |
|
|
|
if(isCircle){ |
|
|
|
option.series[0].axisLabel.formatter=function (value){ |
|
|
|
if (value === 0) { |
|
|
|
return ''; |
|
|
|
if(value==pimin){ |
|
|
|
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]); |
|
|
|