echarts 自定义报错findAxisModel?
需要实现一个扇形的网格,并在上面标注轨迹,极坐标一直是圆形的,使用自定义报错of undefined (reading 'findAxisModel')"
option = {
tooltip: {}, series: [
{
type: 'custom',
coordinateSystem: 'polar',
shape: function(points, params) {
var angleStep = Math.PI / 10 // 角度间隔
var startAngle = -Math.PI / 2 // 起始角度
var lines = []
for (var i = startAngle; i <= Math.PI / 2; i += angleStep) {
var polarPoints = []
var r1 = params.radius[0]
var r2 = params.radius[1]
polarPoints.push([r1 * Math.cos(i), r1 * Math.sin(i)])
polarPoints.push([r2 * Math.cos(i), r2 * Math.sin(i)])
lines.push(polarPoints)
}
return { lines: lines }
},
lineStyle: {
color: '#ccc',
width: 1
},
silent: true
}
]
}
这是自定义的写法,运行不出来,各位大佬给出出注意
以上是 echarts 自定义报错findAxisModel? 的全部内容, 来源链接: utcz.com/p/935350.html