Closed IMdaya closed 2 years ago
@IMdaya It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
Try to set fill
to be transparent
or rgba(0, 0, 0, 0)
.
This issue is closed due to not being active. Please feel free to open it again (for the author) or create a new one and reference this (for others) if you have further questions.
What problem does this feature solve?
百度地图api是可以实现反向遮罩的,如长沙区域内高亮,其他区域遮罩,但在echarts的series里面的自定义功能中,使用renderItem方法去增加覆盖物时,调用的api中,fill没办法填空,默认是黑色的,使得就算我外层镂空用了百度地图api的getBoundary,也没有办法使得内部镂空,需要实现的效果如下链接:https://www.bianchengquan.com/article/270629.html echarts中 renderItem的方法
return { type: 'polygon', shape: { points: echarts.graphic.clipPointsByRect(points, { x: params.coordSys.x, y: params.coordSys.y, width: params.coordSys.width, height: params.coordSys.height }) }, // style: api.style() style: api.style({ fill: '#000', stroke: '#b66464', lineWidth: 3, opacity: 0.4 }) }
What does the proposed API look like?
echarts中 renderItem的方法
return { type: 'polygon', shape: { points: echarts.graphic.clipPointsByRect(points, { x: params.coordSys.x, y: params.coordSys.y, width: params.coordSys.width, height: params.coordSys.height }) }, // style: api.style() style: api.style({ fill: '', stroke: '#b66464', lineWidth: 3, opacity: 0.4 }) }
fill传入为空时可以跟百度地图的api一样没有颜色