HighCharts:如何为xAxis十字准线提供渐变色?

时间:2017-09-08 12:10:46

标签: highcharts

我在我的项目中使用高图但是我不知道如何为x轴十字准线提供渐变色

enter image description here

1 个答案:

答案 0 :(得分:1)

您可以使用Axis.addPlotBand()上的mouseOver功能创建情节带,并使用mouseOut将其移至Axis.removePlotBand()。要应用渐变,请使用linearGradientstops。看一下下面的例子。

API参考:
http://api.highcharts.com/highcharts/Axis.addPlotBand
http://api.highcharts.com/highcharts/Axis.removePlotBand

DOCS参考:
https://www.highcharts.com/docs/chart-design-and-style/colors

例:
http://jsfiddle.net/36comwzL/