在Echarts中option中设置背景图,但是我是根据用户的选择不同而选择不同的背景图。这样会导致echarts不能正常显示。如果不改变image就不会出错。
graphic: [
{
type: 'image',
id: 'logo',
//right: '11',
//bottom: '28%',
//z: 1000,
bounding: 'raw',
style: {
image: '../image/timg.jpg',
width: 1600,//screen.width+100,
}
}
],
最后只能考虑直接修改echarts的div背景图。这样会比之前的方法简单方便
$('#divEquipmentStatus').css("background-image", "url("+BackgroundImage+")");