max Y Axis value in a line chart - Javascript highcharts

Javascript examples for highcharts:Line Chart

Description

max Y Axis value in a line 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://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> 
      <script type="text/javascript">
   $(function () {//from   w  w w. j  a v  a2 s . co  m
       chart = new Highcharts.Chart({
           chart: {
               renderTo: 'container',
               animation: false,
               type: 'line',
               marginRight: 40,
               marginBottom: 35
           },
           title: {
               text: 'PRODUCT (Jan 2011 - March 2013)',
               style: {
                   fontSize: '13px'
               }
           },
           plotOptions: {
               series: {
                   animation: false
               }
           },
           credits: {
               enabled: false
           },
           xAxis: {
               categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb', 'Mar']
           },
           yAxis: {
               min: 0,
               max: 75,
               endOnTick:false,
               tickInterval:25,
               title: {
                   text: ''
               }
           },
           legend: {
               layout: 'vertical',
               align: 'right',
               y: -40,
               x: 6,
               borderWidth: 0,
           },
           series: [{
               name: 'SF',
               data: [31, 34, 32, 36, 37, 22, 24, 31, 33, 27, 15, 37, 41, 33, 38, 34, 29, 40, 36, 37, 46, 23, 27, 30, 40, 31, 36]
           }, {
               name: 'FT',
               data: [45, 46, 39, 43, 34, 23, 36, 45, 40, 34, 25, 37, 36, 38, 40, 42, 28, 36, 30, 40, 33, 13, 30, 34, 33, 36, 42]
           }, {
               name: 'CT',
               data: [23, 17, 25, 18, 25, 52, 24, 19, 21, 32, 52, 19, 18, 21, 16, 19, 38, 20, 33, 22, 18, 62, 37, 31, 20, 23, 17]
           }]
       });
   });

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <div id="container" style="width: 930px; height: 180px"></div>  
   </body>
</html>

Related Tutorials