2017-09-04 145 views
0

我正在使用Highcharts作为我的一个项目。除了我不能改变线条样式('Solid','ShortDash','ShortDot','ShortDashDot','ShortDashDotDot','Dot','Dash','LongDash','DashDot','LongDashDot' ,'LongDashDotDot')在x轴的底部网格线,如附图所示。HighCharts:如何更改最底部x轴网格线的样式

I am using Highcharts for one of my project. Everything is okay except I could not change style() of bottom grid line in x axis as shown in the attached image.

回答

1

因为你强调了线不是yAxis一个gridLine和虚线样式并不适用于它。实际上它覆盖了最底部的网格线。通过其宽度设置为0

API参考禁用它:
http://api.highcharts.com/highcharts/xAxis.lineWidth
http://api.highcharts.com/highcharts/yAxis.gridLineDashStyle

例子:
http://jsfiddle.net/mnp6xa57/

+0

感谢您的帮助。 –

+1

这很容易通过CSS“nth-type-type”选择器来实现(https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-of-type)。例如:http://jsfiddle.net/hfkz9ys1/。 –