Custom range picker - Javascript highcharts

Javascript examples for highcharts:Chart Range

Description

Custom range picker

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"> 
   </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/usdeur.js"></script> 
      <script type="text/javascript">
Highcharts.stockChart('container', {
    chart: {/*from   w  ww  .j a v  a 2  s  . c o m*/
        backgroundColor: '#FFFFFF',
        shadow: true
    },
    rangeSelector: {
        selected: 1,
        x: -10
    },
    series: [{
        name: 'USD to EUR',
        data: usdeur
    }],
    exporting: {
       buttons: {
         customButton: {
           x: -25,
          y: 1,
          symbol: 'circle',
          onclick: function(){ console.log('yeah') }
        }
      }
    }
});

      </script>  
   </body>
</html>

Related Tutorials