highcharts.js更改背景中线条的颜色

时间:2014-08-19 19:07:32

标签: javascript html css highcharts

我有一个基本的条形图。我想改变背景中线条的颜色。有没有办法做到这一点?我查看了他们的API和互联网。好像我只能改变背景颜色

JS fiddle

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'column'          
        },
        colors: ['#00A7E5'],
        legend: {
            enabled: false
        },
        xAxis: {
            categories: ['Tue','Wed','Thur','Fri','Sat','Sun', 'Mon']},
        yAxis: {
            title: {text: ''},
            tickInterval: 10

            },
        series: [{
            name: 'TOTAL APPTS.',
            data: [25, 30, 35, 27, 33, 20, 10]
        }],
        exporting: {
            enabled: false
        },
         credits: {
            enabled: false
        }
    });
});

enter image description here

2 个答案:

答案 0 :(得分:1)

在勾选间隔后,只需在y轴选项中添加以下行。

gridLineColor: 'color'

答案 1 :(得分:0)

gridLineColor: '#ed7d31',
lineColor: '#F3F5F6',
minorGridLineColor: '#ed7d31',
tickColor: '#F3F5F6',
plotLines: [{
    color: '#ed7d31'
}],