echarts设置背景图片的两种方法
方法一
var img = new Image();
img.src = ’ 图片的url’
img.width = ‘100%’
img.height =‘100%’
在option中引用:
option = {
backgroundcolor:{
image:img
}
}
方法二
在div中添加背景图片代码
<div id ="map" style = "background:url('图片的url');cursor:pointer ! important;width:100%;height:100%;border:no"></div>