1
使用了bmap作为图层后,在series里 type='scatter' 的 itemStyle.color 设置不生效
- ECharts4.0 [ECharts 版本]:
- 谷歌浏览器 [浏览器类型和版本]:
option = {
visualMap: {
show: false,
min: 0,
max: 100,
left: 'left',
top: 'bottom',
text: ['高', '低'],
calculable: true,
seriesIndex: [1],
inRange: {
color: ['#0f0c29', '#302b63', '#24243e'],
},
},
bmap: {
center: [104.777182, 26.611526],
zoom: 14,
roam: false,
},
series: [
{
name: '停车场',
type: 'effectScatter',
coordinateSystem: 'bmap',
symbolSize: 20,
showEffectOn: 'render',
rippleEffect: {
brushType: 'stroke',
},
hoverAnimation: true,
label: {
formatter: '{b}',
position: 'bottom',
color: '#fff',
fontSize: 16,
fontWeight: 'bold',
fontFamily: 'Courier New',
show: true,
},
itemStyle: {
color: '#3F6EFE',
shadowBlur: 10,
shadowColor: '#3F6EFE',
},
zlevel: 1,
data: [{ name:"滑雪场", value: [104.747182, 26.597526, 1234] }],
},
{
name: '点',
type: 'scatter',
coordinateSystem: 'bmap',
symbol: 'pin',
symbolSize: 100,
label: {
show: true,
formatter: params => params.value[2],
color: '#fff',
fontSize: 14,
},
itemStyle: {
borderWidth: 1,
borderColor: '#f62157',
color: () => '#f62157', // 标志颜色 不生效
},
zlevel: 6,
data: [{ name:"滑雪场", value: [104.747182, 26.597526, 1234] }],
},
],
}
用geo的时候标记点的颜色都能设置,换成bmap后边框颜色都可以生效,但是标记本身颜色失效,请问者要怎么处理呢?