Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 更改Highcharts中Y轴垂直线的颜色_Javascript_Highcharts - Fatal编程技术网

Javascript 更改Highcharts中Y轴垂直线的颜色

Javascript 更改Highcharts中Y轴垂直线的颜色,javascript,highcharts,Javascript,Highcharts,我试着设计一个可以改变垂直yAxis线颜色的函数,但是运气不好 我可以使用哪个功能更改颜色 这是我想改变的颜色,所以77、78、79等是另一种颜色 希望有人能帮助:-)您可以在yAxis.labels中使用style作为标签颜色,而gridLineColor作为线条颜色: yAxis: { labels: { style: { color: 'red' } }, gridLineColor: 'red' } 您想

我试着设计一个可以改变垂直yAxis线颜色的函数,但是运气不好

我可以使用哪个功能更改颜色

这是我想改变的颜色,所以77、78、79等是另一种颜色


希望有人能帮助:-)

您可以在
yAxis.labels
中使用
style
作为标签颜色,而
gridLineColor
作为线条颜色:

yAxis: {
    labels: {
        style: {
            color: 'red'
        }
    },
    gridLineColor: 'red'
}

您想给标签或轴本身上色吗?在Y轴类别中使用
tickColor
它可以更改垂直yaxis线的颜色。我尝试过这个:-但它似乎对tickColor变量没有反应