Scatter chart with a line connecting the dots in the series - Javascript highcharts

Javascript examples for highcharts:Scatter Chart

Description

Scatter chart with a line connecting the dots in the series

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> 
      <script type="text/javascript">
$(function () {/*from   w w w. j av  a 2 s.  c  om*/
        $('#container').highcharts({
            chart:{
                type:'scatter'
            },
            plotOptions:{
                scatter:{
                    lineWidth:2
                }
            },
            series: [{
                name: 'Tokyo',
                data: [[1.5,7], [2.3,9], [4.2,5.6]]
            }, {
                name: 'New York',
                data: [[0.8,9], [2.1,6.3], [5.0, 10.1]]
            }]
        });
    });

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/modules/exporting.js"></script> 
      <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>  
   </body>
</html>

Related Tutorials