create draw scatter line chart in stock chart - Javascript highcharts

Javascript examples for highcharts:Line Chart

Description

create draw scatter line chart in stock 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"> 
      <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> 
      <script type="text/javascript">
$(function() {//from   www.j av a  2s .c o m
   $.getJSON('https://www.highcharts.com/samples/data/jsonp.php?filename=aapl-v.json&callback=?', function(data) {
      // create the chart
      $('#container').highcharts('StockChart', {
          chart: {
              alignTicks: false
          },
          rangeSelector: {
            inputEnabled: $('#container').width() > 480,
              selected: 1
          },
          title: {
              text: 'AAPL Stock Volume'
          },
            plotOptions: {
                series: {
                    pointWidth: 1
                }
            },
          series: [{
              type: 'column',
              name: 'AAPL Stock Volume',
              data: data,
              dataGrouping: {
               units: [[
                  'week', // unit name
                  [1] // allowed multiples
               ], [
                  'month',
                  [1, 2, 3, 4, 6]
               ]]
              }
          }]
      });
   });
});

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/stock/highstock.js"></script> 
      <script src="https://code.highcharts.com/stock/modules/exporting.js"></script> 
      <div id="container" style="height: 400px"></div>  
   </body>
</html>

Related Tutorials