categories adjust yAxis.labels.y to bottom of line for scatter chart - Javascript highcharts

Javascript examples for highcharts:Line Chart

Description

categories adjust yAxis.labels.y to bottom of line for scatter 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"> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <div id="container" style="height: 400px; width: 500px"></div> 
      <script type="text/javascript">
Highcharts.chart('container', {
    chart: {//from   w  w w  .  ja v a2s.co  m
        marginBottom: 80,
        type: 'scatter'
    },
    xAxis: {
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
    },
    yAxis: {
        labels: {
            align: 'left',
            x: 0,
            y: -2,
        },
        tickmarkPlacement: 'on'
    },
    series: [{
        data: [0,1,2,3,4/*,5,6,7*/] // <- uncomment to see misalignment
    }]
});

      </script>  
   </body>
</html>

Related Tutorials