Drawing a small vertical line on top of chart in line chart by specifying end coordinates - Javascript highcharts

Javascript examples for highcharts:Line Chart

Description

Drawing a small vertical line on top of chart in line chart by specifying end coordinates

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.src.js"></script> 
      <div id="container"></div> 
      <script type="text/javascript">
var chart = Highcharts.chart('container', {
  series: [{/*from  www  .  j  av  a2  s .  c o m*/
    data: [1, 3, 4, 5, 1]
  }, {
     tooltip: {
       pointFormat: null // don't dispaly tooltip
    },
    states: {
       hover: {
         enabled: false
      }
    },
    type: 'scatter', // points don't need to be sorted
    lineWidth: 3,
    marker: {
       enabled: false
    },
    showInLegend: false,
    data: [
      [2, 3], [2, 5]
    ]
  }]
});

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

Related Tutorials