【问题标题】:How to set line color & fill color in spiderweb chart如何在蜘蛛网图中设置线条颜色和填充颜色
【发布时间】:2022-08-18 22:44:38
【问题描述】:

我正在使用 highchart 创建蜘蛛网图表。我想添加填充颜色和不透明度,就像我在下面添加的图像一样。我已经尝试了以下代码。但这没有用。

Using this chart

  • 请提供足够的代码,以便其他人可以更好地理解或重现该问题。

标签: reactjs highcharts


【解决方案1】:

您需要为区域系列使用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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-10-27
    • 1970-01-01
    • 1970-01-01
    • 2017-02-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-28
    • 1970-01-01
    相关资源
    最近更新 更多