1.echarts 自定义标签
注:当设置visualMap的后,给覆盖regions单独定义的值(如果data 中没有regions的地区 则无妨,我这个是从data中删除‘青岛‘,但是lable 无法正常显示了,如有哪位大神有好的方法,请赐教)
initChart(id,data){
// console.log(data);
let obj = echarts.init(document.getElementById(id));
const geoCoordMap = {
‘济南市‘: [117,36.65 ],
‘青岛市‘: [120.33,36.07 ],
‘淄博市‘: [118.05,36.78 ],
‘枣庄市‘: [117.57,34.86 ],
‘东营市‘: [118.49,37.6 ],
‘烟台市‘: [121.0,37.52 ],
‘潍坊市‘: [119.1,36.62 ],
‘济宁市‘: [116.59,35.38 ],
‘泰安市‘: [117.13,36.0 ],
‘威海市‘: [122.3,37.5],
‘日照市‘: [119.46,35.42 ],
‘滨州市‘: [118.03,37.4],
‘德州市‘: [116.29,37.45 ],
‘聊城市‘: [115.97,36.45 ],
‘临沂市‘: [118.35,35.05 ],
‘菏泽市‘: [115.43,35.24 ],
‘莱芜市‘: [117.67,36.2 ],
}
const convertData = function(data) {