highcharts 如何在蜘蛛网图表中设置线条颜色和填充颜色

syqv5f0l  于 2022-11-10  发布在  Highcharts
关注(0)|答案(1)|浏览(313)

我正在使用highchart来创建一个蜘蛛网图表。我想添加一个填充颜色和透明度像我已经添加了下面的图像。我已经尝试了以下代码。但这并不工作。
Using this chart

3hvapo4f

3hvapo4f1#

对于面积系列,需要使用chart.backgroundColorseries.colorseries.fillOpacity。例如:

chart: {
        polar: true,
        type: 'line',
        backgroundColor: '#07292c'
    },
    series: [{
        color: '#30bb00',
        fillOpacity: 0.2,
        type: 'area',
        ...
    }, {
        color: '#71c6d1',
        ...
    }, {
        color: '#d1be75',
        ...
    }]

现场演示:https://jsfiddle.net/BlackLabel/t7mkvq1u/
API参考:

https://api.highcharts.com/highcharts/chart.backgroundColor
https://api.highcharts.com/highcharts/series.area.fillOpacity

相关问题