echart中配置heatmap的时候会报错 Uncaught TypeError: Cannot read properties of undefined (reading 'targetVisuals'),有大神解答一下吗?
配置series代码如下
{
type: 'heatmap',
coordinateSystem: 'geo',
// geoIndex: 0,
pointSize: 10,
blurSize: 8,
minOpacity: 0,
manOpacity: 1,
data: [
[116.405285, 39.904989, 100],
[117.190182, 39.125596, 458],
],
zlevel: 1
}
option={
title: {
text: '来穗地图'
},
// 地图
geo: { map: 'china',
// 是否缩放
roam: true,
// 默认缩放
zoom: 1.2,
// 缩放的大小值
scaleLimit: {
max: 2,
min: 0.5
},
label: {
show: false,
textStyle: {
color: 'blue',
fontSize: 12
}
},
// 所有的事件取消
// silent: true,
itemStyle: {
// 正常样式
normal: {
color: '#ccc',
borderWidth: 1,
},
// 高亮样式
emphasis: {
color: 'red',
borderWidth: 4,
},
},
// 高亮
emphasis: {
label: {
show: true,
borderWidth: 0,
borderColor: 'red',
backgroundColor: 'yellow',
padding: [0, 0, 0, 0],
// padding: [50, 10, 5, 10], // 设置标签的上、右、下、左四个方向的内边距
},
itemStyle: {
opacity: 0.1
}
},
}