Bar chart show full label on Y Axis - Javascript highcharts

Javascript examples for highcharts:Chart Axis

Description

Bar chart show full label on Y Axis

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){/*  w ww  .ja va  2s .  c  om*/
Highcharts.setOptions({
lang: {decimalPoint:'.', thousandsSep: ','}
});
Highcharts.chart('container', {
    chart: {
        type: 'bar',
        marginRight: 50,
    },
    xAxis: {
        categories: ['One', 'Two', 'Three', 'Four', 'Five']
    },
    plotOptions: {
        column: {
            stacking: 'normal'
        }
    },
    yAxis: [{
    labels: {
            format: '{value:,.0f} ',
            rotation: -30,
            y: 20,
            overflow: 'justify',
            padding: '5 px',
            align: 'center',
            style: {
                color: 'black',
                fontSize: '5 px',
                fontWeight: 'normal',
            }
        },
        }],
    series: [
    // first stack
        {
            data: [290000.9, 710000.5, 1060000.4, 1290000.2, 1440000.0],
            stack: 0
        },
    ]
});
    }

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

Related Tutorials