set default invisible for all series for stock chart - Javascript highcharts

Javascript examples for highcharts:Chart Series

Description

set default invisible for all series for stock chart

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Stock 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 ww  w  . j  a  v a 2s  . com
   $('#container').highcharts('StockChart', {
       chart: {
       },
       rangeSelector: {
          selected: 1
       },
       legend: {
          enabled: true,
          layout: 'vertical',
          align: 'right',
          verticalAlign: 'top',
          y: 100
       },
       series: [{
           name: 'ADBE',
           data: ADBE,
            visible:false
       }, {
           name: 'MSFT',
           data: MSFT
       }]
   });
});

      </script> 
   </head> 
   <body> 
      <div id="container" style="height: 400px; min-width: 600px"></div> 
      <script src="https://code.highcharts.com/stock/highstock.js"></script> 
      <script src="https://code.highcharts.com/stock/modules/exporting.js"></script> 
      <script type="text/javascript" src="https://www.highcharts.com/samples/data/three-series-1000-points.js"></script>  
   </body>
</html>

Related Tutorials