- graphic内添加
graphic: {
type: 'image',
left: 'center', // 相对父元素居中
top: '22%', // 相对父元素位置
z: 99,
style: {
image: '',
width: 120,
height: 123
}
}
其中type可以为文字或图形,根据echarts配置项可进行使用。
- echarts options中设置backgroundColor: 'transparent',将背景图加在外盒子上,但是会有覆盖的问题。
- 利用块级作用域,绝对定位一个图片。