Setting the top value for a chart - Javascript highcharts

Javascript examples for highcharts:Chart Value

Description

Setting the top value for a 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 ww  w .ja  v a2 s  .  c o m
    $('#container').highcharts({
        title: {
            text: 'Y axis floor is 0'
        },
        xAxis: {
            categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
        },
        yAxis: {
            floor: 0,
            ceiling: 41,
            max:41,
            maxPadding: 0,
            endOnTick: false,
            title: {
                text: 'Percentage'
            }
        },
        series: [{
            data: [0, 1, 0, 2, 3, 5, 8, 5, 15, 14, 25, 41]
        }]
    });
});

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

Related Tutorials