2017-09-04 61 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/。 –