y-axis Ceiling alignment - Javascript highcharts

Javascript examples for highcharts:Chart Axis

Description

y-axis Ceiling alignment

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> 
      <script type="text/javascript">
var dataX = [0, 67, 43, 100, 100, 80];
var dataY = [950, 900, 807, 650, 600, 450];
$(function () {/*from  www  .  j a  v  a 2 s . c om*/
    $('#container').highcharts({
        chart: {
            alignTicks: false
        },
        series: [{
            name: 'Series 1',
            data: dataX,
            yAxis: 0
        }, {
            name: 'Series 2',
            data: dataY,
            yAxis: 1
        }],
        yAxis: [{
            tickPositions: [0, 25, 50, 75, 100],
            title: {
                text: '1'
            },
        }, {
            tickPositions: [400, 600, 800, 1000],
            title: {
                text: '2'
            },
            opposite: true
        }]
    });
});

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

Related Tutorials