Set yAxis to use integer Only - Javascript highcharts

Javascript examples for highcharts:Chart Axis

Description

Set yAxis to use integer Only

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-1.4.4.min.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){/*from w ww .  j  a va2s. c om*/
$(document).ready(function() {
  $('table.highchart')
    .bind('highchartTable.beforeRender', function(event, highChartConfig) {
      highChartConfig.yAxis = {
        allowDecimals: false,
        title: {
          text: 'Flats'
        }
      }
    })
    .highchartTable();
});
    });

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="http://code.highcharttable.org/master/jquery.highchartTable-min.js"></script> 
      <table class="highchart" data-graph-container-before="1" data-graph-type="line" style="display:none"> 
         <thead> 
            <tr> 
               <th>Month</th> 
               <th>Sales</th> 
               <th>Benefits</th> 
               <th data-graph-vline-x="1" data-graph-vline-name="tooltip value">Deadline</th> 
            </tr> 
         </thead> 
         <tbody> 
            <tr> 
               <td>January</td> 
               <td>1</td> 
               <td>2</td> 
            </tr> 
            <tr> 
               <td>February</td> 
               <td>12</td> 
               <td>4</td> 
            </tr> 
            <tr> 
               <td>March</td> 
               <td>4</td> 
               <td>1</td> 
            </tr> 
         </tbody> 
      </table>  
   </body>
</html>

Related Tutorials