add grid lines without labels to line chart - Javascript highcharts

Javascript examples for highcharts:Line Chart

Description

add grid lines without labels to line chart

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <div id="container" style="height: 400px"></div> 
      <script type="text/javascript">
Highcharts.chart('container', {
  xAxis: {//from  w  w w .ja  va2 s  . co m
    categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
  },
  yAxis: {
    tickPositions: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
    plotLines: [{
      color: '#ccc',
      width: 1,
      value: 0.5
    }, {
      color: '#ccc',
      width: 1,
      value: 1.5
    }, {
      color: '#ccc',
      width: 1,
      value: 2.5
    }]
  },
  series: [{
    data: [1, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10]
  }]
});

      </script>  
   </body>
</html>

Related Tutorials