csv date usage for stock chart - Javascript highcharts

Javascript examples for highcharts:Stock Chart

Description

csv date usage for stock chart

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-2.1.0.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){/*www  . j a v a 2  s. com*/
$(document).ready(function () {
data = [['01-05-2014',155], ['02-06-2014',156], ['03-11-2014',157]];
        $('#container').highcharts('StockChart', {
            xAxis: {
                type: 'datetime'
            },
            title: {
                text: 'Index'
            },
            series: [{
                name: 'Test',
                data: data
            }]
        });
});
    });

      </script> 
   </head> 
   <body>  
      <script src="https://code.highcharts.com/stock/highstock.js"></script> 
      <div id="container"></div>   
   </body>
</html>

Related Tutorials