Javascript examples for highcharts:Line Chart
draw vertical lines on chart
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> $(window).load(function(){// w ww.jav a 2 s . com chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'area' }, title: { text: '<b> </b>' }, xAxis: { labels: { formatter: function() { return this.value; // clean, unformatted number for year } } }, yAxis: { labels: { formatter: function() { return this.value / 1000 +'k'; } } }, tooltip: { formatter: function() { return '<b>'+ Highcharts.numberFormat(this.y, 0) +'</b>'; } }, xAxis: { categories: [ 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun' ], plotBands: [{ // visualize the weekend from: 5.5, to: 6.5, color: 'rgba(68, 170, 213, .2)' }] }, plotOptions: { area: { pointStart: 1, marker: { enabled: false, symbol: 'circle', radius: 1, states: { hover: { enabled: true } } } } }, series: [{ name: 'Visit', data: [946, 733, 764, 887, 832,1423] }, { name: 'Unique', data: [746, 633, 664, 687,702,1266] }] },function(chart){ chart.renderer.path(['M', 265, 333.5, 'V',190]) .attr({ 'stroke-width': 1, stroke: 'black', zIndex:1000 }) .add(); }); }); </script> </head> <body> <script src="https://code.highcharts.com/highcharts.js"></script> <div id="container"></div> </body> </html>