hide bar chart x - axis data values - Javascript highcharts

Javascript examples for highcharts:Bar Chart

Description

hide bar chart x - axis data values

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>ElementStacks</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.0.js"></script> 
      <script type="text/javascript" src="https://code.highcharts.com/highcharts.js"></script> 
      <script type="text/javascript">
    $(function(){/*from w  ww  . j av a2s  .c  o m*/
    var chart = new Highcharts.Chart({
                    chart: {
                        renderTo: "container",
                        defaultSeriesType: 'bar'
                    },
                    title: {
                        text: null
                    },
                    xAxis: {
                        labels:
                        {
                            enabled: false
                        }
                    },
                    yAxis: {
                        min: 0,
                        gridLineWidth: 0,
                        title: {
                            text: ''
                        },
                        labels:
                        {
                            enabled: false
                        }
                    },
                    tooltip: {
                        formatter: function () {
                            return '';
                        }
                    },
                    plotOptions: {
                        bar: {
                            dataLabels: {
                                enabled: true
                            },
                            pointWidth: 35,
                            color: '#D9CDC1'
                        }
                    },
                    legend: {
                        enabled: false
                    },
                    credits: {
                        enabled: false
                    },
                    series: [{
                        name: 'Year 1800',
                        data: [107]
                    }]
                });
    });

      </script> 
   </head> 
   <body> 
      <div id="container" style="height: 400px"></div>  
   </body>
</html>

Related Tutorials