Javascript Chart.js雷达标签坐标

Javascript Chart.js雷达标签坐标,javascript,charts,coordinates,chart.js,Javascript,Charts,Coordinates,Chart.js,有没有办法得到雷达图上标签的坐标? 我正在尝试在标签区域中放置图像而不是文本。您可以使用“缩放”属性进行计算。动画完成后,在这些点上绘制一个蓝色圆圈 onAnimationComplete: function () { for (var i = 0; i < this.scale.valuesCount; i++) { // get the poitn position var pointLabelPosition = this.scale.getP

有没有办法得到雷达图上标签的坐标?
我正在尝试在标签区域中放置图像而不是文本。

您可以使用“缩放”属性进行计算。动画完成后,在这些点上绘制一个蓝色圆圈

onAnimationComplete: function () {
    for (var i = 0; i < this.scale.valuesCount; i++) {
        // get the poitn position
        var pointLabelPosition = this.scale.getPointPosition(i, this.scale.calculateCenterOffset(this.scale.max) + 5);

        // draw a circle at that point
        this.chart.ctx.beginPath();
        this.chart.ctx.arc(pointLabelPosition.x, pointLabelPosition.y, 5, 0, 2 * Math.PI, false);
        this.chart.ctx.fillStyle = '#77e';
        this.chart.ctx.fill();
        this.chart.ctx.stroke();
    }
}
onAnimationComplete:函数(){ 对于(变量i=0;i

小提琴-

很有魅力,非常感谢!!