chart.js 雷达点标签选项不起作用

chart.js radar pointLabel options not working

免责声明:我是初学者。

使用 Chart.js 我正在绘制雷达图,但在选择选项时遇到了问题。在 Chart.js 文档中有一个 table specifying the scale which lists angleLines and pointLabels. These have a number of options, also listed in the documentation. In the following code setting the lineWidth of angleLines works, whereas setting fontSize of pointLabel does not. This leads to this. 将 pointLabel 选项 fontColor 设置为红色也没有任何作用所以我假设问题是我如何使用 pointLabel。

代码:

var dayData = {
        labels: dayDayRawdata,
        datasets:[{ 
            label: 'Total Votes',
            data:dayTotalRawdata,
            backgroundColor: 'rgba(102, 153, 255,0.2)',
            borderColor: 'rgba(102, 153, 255,1)'
        },{
            label: 'Yes Votes',
            data:dayYesRawdata,
            backgroundColor: 'rgba(0,204,102,0.2)',
            borderColor: 'rgba(0,204,102,1)'
        },{
            label: 'No Votes',
            data: dayNoRawdata,
            backgroundColor: 'rgba(255, 102, 102,0.2)',
            borderColor: 'rgba(255, 102, 102,1)'
        }]
    };


var radarOptions = {

    title: {
        display: true,
        text: 'Custom Chart Title'
    },

    scale: {
        angleLines:{
            lineWidth: 5
        },
        pointLabel:{
            fontSize: 20,
            fontColor: 'ff0000'
        },

    }


};  

var dayChart = new Chart(dayPlotEl, {type:"radar", data: dayData, options: radarOptions});

如有任何帮助,我们将不胜感激。具体问题:

pointLabels指的是边缘周围的标签还是雷达?

提前致谢

只是一个错字:pointLabels 不是 pointLabel

scale: {
        angleLines:{
            lineWidth: 5
        },
        pointLabels:{
            fontSize: 20,
            fontColor: 'ff0000'
        },
 }

fiddle example