custom scaling on y axis and mix of linear and logarithmic for line chart - Javascript highcharts

Javascript examples for highcharts:Line Chart

Description

custom scaling on y axis and mix of linear and logarithmic for line chart

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> 
      <script type="text/javascript">
$(function () {//from   w w w.  j av a 2  s.c  o  m
        $('#containerBot').highcharts({
            chart: {marginTop: 1},
            title: {margin: 0, text: ''},
            yAxis: {max: 100},
            exporting: {enabled: false},
            series: [{
                name: 'One',
                data: [70.0, 60.9, 90.5, 140.5, 180.2, 210.5, 205.2, 260.5, 230.3, 180.3, 130.9, 90.6]
            }, {
                name: 'Two',
                data: [-0.2, 0.8, 50.7, 110.3, 170.0, 220.0, 240.8, 204.1, 200.1, 140.1, 80.6, 20.5]
            }]
        });
        $('#containerTop').highcharts({
            chart: {marginBottom: -1},
            title: {text: 'My Chart'},
            yAxis: {min: 100},
            xAxis: {labels: {enabled: false}},
            legend: {enabled: false},
            exporting: {enabled: false},
            credits: {enabled: false},
            series: [{
                name: 'One',
                data: [70.0, 60.9, 90.5, 140.5, 180.2, 210.5, 205.2, 260.5, 230.3, 180.3, 130.9, 90.6]
            }, {
                name: 'Two',
                data: [-0.2, 0.8, 50.7, 110.3, 170.0, 220.0, 240.8, 204.1, 200.1, 140.1, 80.6, 20.5]
            }]
        });
});

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/modules/exporting.js"></script> 
      <div id="containerTop" style="min-width: 310px; height: 200px; margin: 0 auto"></div> 
      <div id="containerBot" style="min-width: 310px; height: 400px; margin: 0 auto"></div>  
   </body>
</html>

Related Tutorials