hide categories labels on overflow in bar chart - Javascript highcharts

Javascript examples for highcharts:Bar Chart

Description

hide categories labels on overflow in bar 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://code.jquery.com/jquery-1.9.1.js"></script> 
      <script type="text/javascript">
$(function () {//w ww .  ja v a2s  .com
    $('#container').highcharts({
        chart: {
            type: 'bar'
        },
        title: {
            text: ''
        },
        subtitle: {
            text: ''
        },
        xAxis: {
            categories: ['cat1', 'cat2', 'cat3', 'cat4', 'cat5', 'cat6', 'cat7', 'cat8', 'cat9', 'cat10'],
            title: {
                text: null
            },
            labels: {
                step: 1
            }
        },
        series: [{
            name: 'ser1',
            data: [107, 31, 635, 203, 2, 34, 54, 41, 105, 20]
        }, ]
    });
});

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/modules/exporting.js"></script> 
      <div id="container" style="min-width: 310px; max-width: 800px; height: 230px; margin: 0 auto"></div>  
   </body>
</html>

Related Tutorials