javascript - Highcharts - 无法更改线条颜色

标签 javascript jquery highcharts

我想更改 Highcharts 蛛网图的蛛网线。我正在使用 JSFiddle通过 someone else因为我的出于某种原因无法正常工作。

我希望能够更改蜘蛛线的线条颜色。我要更改什么属性才能获得它?

$('#emotion-ranking-graph-bar').highcharts({
    chart: {
        polar: true,
        type: 'line',
        backgroundColor: 'rgba(255,255,255,0.0)'
    },
    exporting: {
        enabled: false
    },
    title: {
        text: '',
        x: 0
    },
    pane: {
        size: '80%'
    },
    xAxis: {
        categories: ['Joy', 'Sorrow', 'Anger', 'Seriousness',
                'Information Technology', 'Administration'],
        tickmarkPlacement: 'on',
        lineWidth: 0,
        labels: {
            enabled: true
        }
    },
    yAxis: {
        gridLineInterpolation: 'polygon',
        lineWidth: 0,
        min: 0,
        color: 'rgba(255,255,255,1)',
        labels: {
            enabled: false
        }
    },
    tooltip: {
        shared: true,
        pointFormat: '<span style="color:{series.color}">{series.name}: <b>${point.y:,.0f}</b><br/>'
    },
    legend: {
        enabled: false
    },
    series: [{
        name: 'Emotional Analysis Spectrum',
        data: [43000, 19000, 60000, 35000, 17000, 10000],
        pointPlacement: 'on',
        color: 'rgba(0,0,0,0.7)'
    }]
})

最佳答案

从中心向外延伸的线是 yAxis,构成五边形的线是 xAxis。您必须更改两者的 gridLineColor 选项:

http://jsfiddle.net/przJs/41/

在这里你有很多选择:http://api.highcharts.com/highcharts/xAxis.gridLineColor

关于javascript - Highcharts - 无法更改线条颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42283567/

相关文章:

jquery - 在 IE 8 上将背景颜色设置为透明动画

highcharts - 最后一个 y 轴标签未显示在 highcharts spiderweb 上

javascript - Testcafe headless 可见性检查

javascript - 我可以从父页面修改 iframe 中的元素吗?

javascript - 如果将响应图像添加到选项卡式导航菜单中的列,如何限制列宽不扩大

javascript - 第 3 方脚本破坏了我的 JS

javascript - 添加具有属性名称的 HighCharts 数据系列

javascript - HighStock 图表 : Extract time based on user selection from the Navigator window

javascript - 你如何让 js_xlsx 保存所有空标题?

javascript - VueJS - 元素 UI 输入组件 - 事件处理程序 "input"错误