Sona Mathew
Sona Mathew

Reputation: 35

How do you show grid lines for both x axis and y axis in highchart?

I want to draw a chart using highchart. By default, only the y axis grid lines are shown. How do you enable the option to show grid line for x axis as well?

Upvotes: 2

Views: 9013

Answers (1)

ewolden
ewolden

Reputation: 5803

Set gridLineWidth to 1 to enable grid lines. Like this:

xAxis: {
  gridLineWidth: 1
}, 
yAxis: {
  gridLineWidth: 1
}

Working example: http://jsfiddle.net/ewolden/7sj67gs6/

API ref: https://api.highcharts.com/highcharts/xAxis.gridLineWidth

Upvotes: 12

Related Questions