Javascript PrimeFaces极坐标图-网格线颜色变化

Javascript PrimeFaces极坐标图-网格线颜色变化,javascript,charts,primefaces,chart.js,jqplot,Javascript,Charts,Primefaces,Chart.js,Jqplot,我的应用程序中有一个p:polareachart图表,我将Primefaces-Primefaces-7.0.RC1与JSF2一起使用 我想更改每个圆(网格线)的线颜色。我尝试了以下代码,但根本不起作用 gridLines.setDisplay(true); gridLines.setColor("rgb(255, 255, 255)"); gridLines.setLineWidth(10); radialScales.setGridLines(gridLines); options.

我的应用程序中有一个
p:polareachart
图表,我将Primefaces-Primefaces-7.0.RC1与JSF2一起使用

我想更改每个圆(网格线)的线颜色。我尝试了以下代码,但根本不起作用

gridLines.setDisplay(true);

gridLines.setColor("rgb(255, 255, 255)");

gridLines.setLineWidth(10);

radialScales.setGridLines(gridLines);

options.setScales(radialScales);

polarAreaMode.setOptions(options);

请让我知道我做错了什么?

看起来你很容易做到。请参见此示例:

在使用“backgroundColor”的页面的视图源中:

查看PolareAchart的PrimeFaces源代码,我看到BackgroundColor获取了一个字符串列表,即RGB字符串

公共类PolareAchartDataSet扩展ChartDataSet{
私有静态最终长serialVersionUID=1L;
私人名单数据;
私有列表背景色;
私有列表边界颜色;
私有列表边界宽度;
私有列表背景颜色;
私有列表颜色;
私有列表宽度;

请添加错误/实际输出与预期输出。我没有收到任何错误。预期输出是“网格线应更改为我提到的颜色”,但没有发生任何事情。
        var randomScalingFactor = function() {
            return Math.round(Math.random() * 100);
        };

        var chartColors = window.chartColors;
        var color = Chart.helpers.color;
        var config = {
            data: {
                datasets: [{
                    data: [
                        randomScalingFactor(),
                        randomScalingFactor(),
                        randomScalingFactor(),
                        randomScalingFactor(),
                        randomScalingFactor(),
                    ],
                    backgroundColor: [
                        color(chartColors.red).alpha(0.5).rgbString(),
                        color(chartColors.orange).alpha(0.5).rgbString(),
                        color(chartColors.yellow).alpha(0.5).rgbString(),
                        color(chartColors.green).alpha(0.5).rgbString(),
                        color(chartColors.blue).alpha(0.5).rgbString(),
                    ],
                    label: 'My dataset' // for legend
                }],
                labels: [
                    'Red',
                    'Orange',
                    'Yellow',
                    'Green',
                    'Blue'
                ]
            },
            options: {
                responsive: true,
                legend: {
                    position: 'right',
                },
                title: {
                    display: true,
                    text: 'Chart.js Polar Area Chart'
                },
                scale: {
                    ticks: {
                        beginAtZero: true
                    },
                    reverse: false
                },
                animation: {
                    animateRotate: false,
                    animateScale: true
                }
            }
        };