padding for range selector when displaying last label on y axis? - Javascript highcharts

Javascript examples for highcharts:Chart Label

Description

padding for range selector when displaying last label on y axis?

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">
$(function () {//w  w w  .ja v a 2  s .c  o m
    var chart = new Highcharts.StockChart({
        chart: {
            renderTo: 'container',
            alignTicks: false
        },
        yAxis: [{ // Primary yAxis
                showLastLabel: false,
                title: {
                    text: 'Time Published',
                    style: {
                        color: '#89A54E'
                    }
                },
                gridLineWidth: 0,
                opposite: true,
                tickInterval:10,
                maxPadding:1
            }, { // Secondary yAxis
                showLastLabel: false,
                maxPadding:0.2,
                tickInterval:25,
                title: {
                    text: '% Audience Coverage',
                    style: {
                        color: '#4572A7'
                    }
                },
            }],
        series: [{
            yAxis: 0,
            type: "scatter",
            data:[ [1142294400000,2],
                   [1183334400000,5],
                   [1199232000000,18],
                   [1230768000000,9],
                   [1262304000000,4],
                   [1294012800000,20],
                   [1325548800000,1],
                   [1357084800000,6] ]
        }, {
            yAxis: 1,
            type: "areaspline",
            data:[ [1142294400000,9],
                   [1183334400000,10],
                   [1199232000000,15],
                   [1230768000000,25],
                   [1262304000000,35],
                   [1294012800000,46],
                   [1325548800000,47],
                   [1357084800000,68] ]
        }]
    });
});

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/stock/highstock.js"></script> 
      <script src="https://code.highcharts.com/stock/modules/exporting.js"></script> 
      <div id="container" style="height: 300px; min-width: 400px"></div>  
   </body>
</html>

Related Tutorials